add deleted attribute
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user