add deleted attribute
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 45s
Pull Request Pipeline / lint (pull_request) Successful in 46s

This commit is contained in:
gelbeinhalb
2026-04-30 11:56:15 +02:00
parent 1ec1df3514
commit 66e657235a
6 changed files with 30 additions and 7 deletions

View File

@@ -2,8 +2,9 @@ class ScoreEntry {
final int roundNumber;
final int score;
final int change;
final bool deleted;
ScoreEntry({required this.score, this.roundNumber = 0, this.change = 0});
ScoreEntry({required this.score, this.roundNumber = 0, this.change = 0, this.deleted = false});
@override
String toString() {
@@ -13,11 +14,13 @@ class ScoreEntry {
ScoreEntry.fromJson(Map<String, dynamic> json)
: roundNumber = json['roundNumber'],
score = json['score'],
change = json['change'];
change = json['change'],
deleted = json['deleted'] ?? false;
Map<String, dynamic> toJson() => {
'roundNumber': roundNumber,
'score': score,
'change': change,
'deleted': deleted,
};
}