ConsonaThemeController class

Inheritance

Constructors

ConsonaThemeController({ConsonaThemeData? theme, ConsonaThemeData? darkTheme, ConsonaThemeMode themeMode = ConsonaThemeMode.system, ConsonaStorageAdapter? storage})

Properties

activePreset ↔ String
getter/setter pair
darkTheme → ConsonaThemeData
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
seedColor → Color?
The brand seed currently applied, or null when the palette comes from a preset.
no setter
storage → ConsonaStorageAdapter?
final
theme → ConsonaThemeData
no setter
themeMode ↔ ConsonaThemeMode
getter/setter pair

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).

Operators

operator ==(Object other) → bool
The equality operator.
inherited