feat(flutter): token + asset sync from web; gen_tokens.dart

shared/fabledsword.tokens.json mirrors web/src/lib/styles/tokens.json;
assets/error-copy.json mirrors the web's error-code copy table;
assets/svg/album-fallback.svg mirrors the web placeholder. Together
these give Flutter the same visual + copy starting point as the SPA.

tool/gen_tokens.dart emits lib/theme/tokens.dart from the JSON; the
generated file is committed so CI can verify the JSON and the Dart
file haven't drifted (gate added in Task 21).

tool/sync_shared.sh mkdirs the shared/ + assets/ destinations before
copying so the script works on a fresh checkout (the original
plan-text shape only mkdir'd assets/svg).

pubspec.yaml assets block uncommented now that the three asset paths
exist on disk.
This commit is contained in:
2026-05-02 16:55:21 -04:00
parent d8bfdc1733
commit f97cf6eb38
7 changed files with 156 additions and 7 deletions
+4 -7
View File
@@ -30,10 +30,7 @@ dev_dependencies:
flutter:
uses-material-design: true
# assets:
# - assets/svg/
# - assets/error-copy.json
# - shared/fabledsword.tokens.json
# NOTE: Task 5 will sync assets/ + shared/ and uncomment the block above.
# The flutter test runner refuses to build a bundle with missing asset
# paths, even though `flutter pub get` and `flutter analyze` only warn.
assets:
- assets/svg/
- assets/error-copy.json
- shared/fabledsword.tokens.json