Added toString method + default values

This commit is contained in:
2026-04-21 22:11:09 +02:00
parent 31c6e03f4d
commit 571d32f07a

View File

@@ -1,13 +1,14 @@
class ScoreEntry { class ScoreEntry {
int roundNumber = 0; final int roundNumber;
final int score; final int score;
final int change; final int change;
ScoreEntry({ ScoreEntry({required this.score, this.roundNumber = 0, this.change = 0});
required this.roundNumber,
required this.score, @override
required this.change, String toString() {
}); return 'ScoreEntry{roundNumber: $roundNumber, score: $score, change: $change}';
}
ScoreEntry.fromJson(Map<String, dynamic> json) ScoreEntry.fromJson(Map<String, dynamic> json)
: roundNumber = json['roundNumber'], : roundNumber = json['roundNumber'],