flawless_theme 0.1.0-alpha.7
flawless_theme: ^0.1.0-alpha.7 copied to clipboard
Shared theming utilities and tokens for Flawless UI.
flawless_theme #
flawless_theme is the theme orchestration layer for Flawless.
It connects your app’s ThemeData with an active FlawlessDesignSystem and provides:
FlawlessThemeControllerfor runtime theme-mode switchingFlawlessThemeControllerProviderfor wiring controllers into the widget treeFlawlessTheme(InheritedWidget) for subtree design-system overridesFlawlessThemeExtensionfor storing the active design system inThemeData.extensions
Usage #
Create a ThemeData from a concrete theme package (Material 3 or Glass), then read the design system anywhere.
final designSystem = FlawlessTheme.designSystemOf(context);
To override the design system for a subtree:
FlawlessTheme(
designSystem: GlassDesignSystem(),
child: const MyWidgetTree(),
)
Notes #
flawless_themedepends onflawless_corefor contracts.- Concrete themes add a
FlawlessThemeExtensionvia theircreate...Theme(...)helpers.