Renamed GameColor to AppColor
This commit is contained in:
@@ -8,13 +8,13 @@ class Game {
|
||||
final String name;
|
||||
final Ruleset ruleset;
|
||||
final String description;
|
||||
final GameColor color;
|
||||
final AppColor color;
|
||||
final String icon;
|
||||
|
||||
Game({
|
||||
required this.name,
|
||||
required this.ruleset,
|
||||
this.color = GameColor.orange,
|
||||
this.color = AppColor.orange,
|
||||
this.description = '',
|
||||
this.icon = '',
|
||||
String? id,
|
||||
@@ -33,7 +33,7 @@ class Game {
|
||||
String? name,
|
||||
Ruleset? ruleset,
|
||||
String? description,
|
||||
GameColor? color,
|
||||
AppColor? color,
|
||||
String? icon,
|
||||
}) {
|
||||
return Game(
|
||||
@@ -73,7 +73,7 @@ class Game {
|
||||
orElse: () => Ruleset.singleWinner,
|
||||
),
|
||||
description = json['description'],
|
||||
color = GameColor.values.firstWhere((e) => e.name == json['color']),
|
||||
color = AppColor.values.firstWhere((e) => e.name == json['color']),
|
||||
icon = json['icon'];
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
|
||||
@@ -113,7 +113,7 @@ class Match {
|
||||
name: '',
|
||||
ruleset: Ruleset.singleWinner,
|
||||
description: '',
|
||||
color: GameColor.blue,
|
||||
color: AppColor.blue,
|
||||
icon: '',
|
||||
),
|
||||
group = null,
|
||||
|
||||
@@ -8,7 +8,7 @@ class Team {
|
||||
final String id;
|
||||
final String name;
|
||||
final DateTime createdAt;
|
||||
final GameColor color;
|
||||
final AppColor color;
|
||||
final int? score;
|
||||
final List<Player> members;
|
||||
|
||||
@@ -16,7 +16,7 @@ class Team {
|
||||
String? id,
|
||||
required this.name,
|
||||
DateTime? createdAt,
|
||||
this.color = GameColor.blue,
|
||||
this.color = AppColor.blue,
|
||||
this.score,
|
||||
required this.members,
|
||||
}) : id = id ?? const Uuid().v4(),
|
||||
@@ -31,7 +31,7 @@ class Team {
|
||||
String? id,
|
||||
String? name,
|
||||
DateTime? createdAt,
|
||||
GameColor? color,
|
||||
AppColor? color,
|
||||
int? score,
|
||||
List<Player>? members,
|
||||
}) {
|
||||
@@ -71,7 +71,7 @@ class Team {
|
||||
: id = json['id'],
|
||||
name = json['name'],
|
||||
createdAt = DateTime.parse(json['createdAt']),
|
||||
color = GameColor.values.byName(json['color'] ?? GameColor.blue.name),
|
||||
color = AppColor.values.byName(json['color'] ?? AppColor.blue.name),
|
||||
score = json['score'] ?? 0,
|
||||
members = []; // Populated during import via DataTransferService
|
||||
|
||||
|
||||
Reference in New Issue
Block a user