Fixed toJson methods
This commit is contained in:
@@ -17,7 +17,5 @@ class Player {
|
||||
name = json['name'];
|
||||
|
||||
/// Converts the Player instance to a JSON object.
|
||||
String toJson() {
|
||||
return 'Player{id: $id,name: $name}';
|
||||
}
|
||||
Map<String, dynamic> toJson() => {'id': id, 'name': name};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user