refactor(legacy): migrate theming to Material 3 + SfColors extension
Replace the ThemePort/ThemeCode abstraction (GetIt-registered adapter) with a Riverpod-driven Material 3 ColorScheme, an SfColors ThemeExtension for brand tokens, and a user-facing appearance selector for light/dark/ system modes. Persisted via SharedPreferences, reacts to system brightness changes. Payments mode keeps the existing ThemePort API. Highlights - New legacy_theme package: LegacyAppTheme (light/dark), LegacyColorSchemes, SfColors ThemeExtension, LegacyThemePreferences, LegacyThemeNotifier, LegacyThemeSelector. Timeframe-based variants scaffolded but disabled. - New /legacy/dashboard/control_panel/settings/appearance route + screen. - MaterialApp.router picks the legacy theme only when isLegacyMode. - ~90 ThemeCode.* usages migrated to colorScheme.* / context.sfColors.*. - 25 widgets dropped the 'ThemePort theme' constructor param. - ~145 hardcoded colors migrated (exact hex 1:1, grey.shade tiers, destructive red -> colorScheme.error, background whites -> surface). Content-over-color whites, transparents, and brand semantic reds/ oranges/greens intentionally preserved. - sf_localizations updated with appearance / appearanceDescription keys in all six locales.
This commit is contained in:
@@ -25,6 +25,7 @@ workspace:
|
||||
- modules/legacy/modules/settings
|
||||
- modules/legacy/packages/legacy_shared
|
||||
- modules/legacy/packages/legacy_device_state
|
||||
- modules/legacy/packages/legacy_theme
|
||||
- packages/design_system
|
||||
- packages/flutter_treezor_entrust_sdk_bridge
|
||||
- packages/flutter_treezor_entrust_sdk_bridge/example
|
||||
|
||||
Reference in New Issue
Block a user