ConsonaThemeController class
Methods
-
addListener(VoidCallback listener)
→ void
-
Register a closure to be called when the object changes.
inherited
-
dispose()
→ void
-
Discards any resources used by the object.
inherited
-
loadPersisted()
→ Future<void>
-
Loads persisted theme configuration from storage if available.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners()
→ void
-
Call all the registered listeners.
inherited
-
removeListener(VoidCallback listener)
→ void
-
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
setBorderStrategy(ConsonaBorderStrategy strategy)
→ void
-
Switches how edges are drawn (hairline border, shadow edge, both, none).
-
setDensity(ConsonaDensity density)
→ void
-
-
setMotion(ConsonaMotion motion)
→ void
-
-
setPreset(String presetName)
→ void
-
Switches to one of the named whole-theme presets.
-
setRadius(ConsonaRadius radius)
→ void
-
-
setSeedColor(Color seed)
→ void
-
Sets a new brand seed color for dynamic tonal palette generation.
The currently selected seed is exposed as seedColor.
-
setShadowLevel(ConsonaShadowLevel level)
→ void
-
Sets the elevation preset (ConsonaShadowLevel.none flattens everything).
-
setStroke(ConsonaStroke stroke)
→ void
-
-
setTheme(ConsonaThemeData newTheme, {ConsonaThemeData? darkTheme})
→ void
-
Sets the active light theme (colors included) and optional dark theme. Clears any seed color.
-
setThemeMode(ConsonaThemeMode mode)
→ void
-
Sets the active theme mode (system, light, dark).
-
setTypography(ConsonaTypography typography)
→ void
-
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateTheme(ConsonaThemeData transform(ConsonaThemeData current))
→ void
-
Applies a knob transformation (radius, density, shadow, stroke, border
strategy, typography, motion) to BOTH the light and dark themes while
preserving each side's own color palette (including any brand seed).