fix: tolerate num-typed JSON color entries in SeasonTheme
This commit is contained in:
@@ -17,12 +17,12 @@ class SeasonTheme {
|
||||
tileSet: (json['tileSet'] as String?) ?? 'spring',
|
||||
background: (json['background'] as String?) ?? '',
|
||||
backgroundGradient: json['backgroundGradient'] != null
|
||||
? [for (final c in json['backgroundGradient'] as List) c as int]
|
||||
? [for (final c in json['backgroundGradient'] as List) (c as num).toInt()]
|
||||
: defaultGradient,
|
||||
accentColor: (json['accentColor'] as int?) ?? 0xFFFF7EB3,
|
||||
particleType: (json['particleType'] as String?) ?? 'petals',
|
||||
tilePalette: json['tilePalette'] != null
|
||||
? [for (final c in json['tilePalette'] as List) c as int]
|
||||
? [for (final c in json['tilePalette'] as List) (c as num).toInt()]
|
||||
: null,
|
||||
boardTint: json['boardTint'] as int?,
|
||||
);
|
||||
@@ -42,7 +42,7 @@ class SeasonTheme {
|
||||
/// petals | snow | leaves | none
|
||||
final String particleType;
|
||||
|
||||
/// Optional 8-color tile override; null = built-in candy palette.
|
||||
/// Optional tile color override; null = built-in candy palette.
|
||||
final List<int>? tilePalette;
|
||||
|
||||
/// Optional board background override.
|
||||
|
||||
Reference in New Issue
Block a user