use clock.now() instead of DateTime.now() for DTO creation timestamps
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:clock/clock.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
class Player {
|
||||
@@ -7,7 +8,7 @@ class Player {
|
||||
|
||||
Player({String? id, DateTime? createdAt, required this.name})
|
||||
: id = id ?? const Uuid().v4(),
|
||||
createdAt = createdAt ?? DateTime.now();
|
||||
createdAt = createdAt ?? clock.now();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
||||
Reference in New Issue
Block a user