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.