kit_export library

Serialises the kit's theme values to JSON for the UI kit preview (docs/ui-kit/data/), so the preview reads what the Flutter code builds instead of hand-copied hex. Imported only by the test/kit_export_test.dart files in ui_core and each app (scripts/export-kit-data.sh runs them); deliberately not part of the portal_ui_core.dart barrel.

Constants

kitExportDir → const String
Where the export tests write. Empty unless the test run passes --dart-define=KIT_EXPORT_DIR=<abs path to docs/ui-kit/data>; each test is skip: kitExportDir.isEmpty, so a plain flutter test writes nothing.

Functions

kitHex(Color c) → String
#RRGGBB, or #AARRGGBB when not opaque.
kitJson(Object? json) → String
Pretty-printed, newline-terminated. Key order is insertion order, which every map here fixes, so a re-run with no code change is a no-op diff.
kitScheme({required String app, required String generatedBy, required ThemeData light, ThemeData? dark, Map<String, Object?> skin(ThemeData theme)?}) → Map<String, Object?>
One app's themes, built by the app's own theme functions. skin returns the app's own colour roles for a theme (Colors, lists and maps of them).
kitTextStyle(TextStyle? s) → Map<String, Object?>
Colour is left out: token styles carry none, and a theme's roles are coloured from its scheme.
kitTokens(DesignTokens t) → Map<String, Object?>
Every value in t. Springs are static on PortalMotion, so they are the same in every preset; gradients need a scheme and live in kitScheme.