Implemented uuid for all dtos
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
class Player {
|
||||
final String id;
|
||||
final String name;
|
||||
|
||||
Player({required this.id, required this.name});
|
||||
Player({String? id, required this.name}) : id = id ?? const Uuid().v4();
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
||||
Reference in New Issue
Block a user