From 6bb1eac28c6345677636983bb197996b2585b828 Mon Sep 17 00:00:00 2001 From: airkjw Date: Thu, 11 Jun 2026 21:02:23 +0900 Subject: [PATCH] fix: tolerate num-typed JSON color entries in SeasonTheme --- lib/game/models/season.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/game/models/season.dart b/lib/game/models/season.dart index 4692778..2ce1657 100644 --- a/lib/game/models/season.dart +++ b/lib/game/models/season.dart @@ -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? tilePalette; /// Optional board background override.