Updated comments
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 44s
Pull Request Pipeline / lint (pull_request) Successful in 46s

This commit is contained in:
2026-04-13 22:47:29 +02:00
parent c9188c222a
commit c43b7b478c
3 changed files with 16 additions and 11 deletions

View File

@@ -24,16 +24,17 @@ class Group {
return 'Group{id: $id, name: $name, description: $description, members: $members}';
}
/// Creates a Group instance from a JSON object (memberIds format).
/// Player objects are reconstructed from memberIds by the DataTransferService.
/// Creates a Group instance from a JSON object where the related [Player]
/// objects are represented by their IDs.
Group.fromJson(Map<String, dynamic> json)
: id = json['id'],
createdAt = DateTime.parse(json['createdAt']),
name = json['name'],
description = json['description'],
members = []; // Populated during import via DataTransferService
members = [];
/// Converts the Group instance to a JSON object using normalized format (memberIds only).
/// Converts the Group instance to a JSON object. Related [Player] objects are
/// represented by their IDs.
Map<String, dynamic> toJson() => {
'id': id,
'createdAt': createdAt.toIso8601String(),