fix(flutter): handle nested colors split in tokens.json codegen

Web tokens.json was reshaped for the SPA theme toggle (#362) with
colors split into dark/light/flat blocks. gen_tokens.dart still
expected a flat string map and threw _Map<String,dynamic> cast
errors in the flutter CI workflow. Read colors.dark + colors.flat
and merge into the existing flat namespace; light variants will be
emitted when the Flutter client gains a theme toggle as part of
#356 parity work. Adds hyphen→camelCase normalization so the new
on-action token surfaces as onAction.
This commit is contained in:
2026-05-03 14:46:27 -04:00
parent 7faa7b4e1f
commit 7d82be864d
3 changed files with 52 additions and 30 deletions
+1
View File
@@ -17,6 +17,7 @@ class FabledSwordTokens {
static const Color error = Color(0xFFC04A1F);
static const Color info = Color(0xFF3D5A6E);
static const Color accent = Color(0xFF4A6B5C);
static const Color onAction = Color(0xFFE8E4D8);
static const double radiusSm = 4;
static const double radiusMd = 8;
static const double radiusLg = 12;