FlintThemeController class
Reactive controller for the active Flint theme mode.
Use flintTheme to switch light/dark mode from UI events and listen to the active mode with StateSignalListener.
Constructors
- FlintThemeController({FlintThemeMode initialMode = FlintThemeMode.light})
-
Creates a theme controller with
initialMode.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
mode
→ StateSignal<
FlintThemeMode> -
Reactive active theme mode.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
configure(
{FlintThemeMode? initialMode, BrowserStorage? storage, String? storageKey, Object? target}) → void - Configures the controller for an app root.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setMode(
FlintThemeMode next) → void -
Switches to
next. -
toggle(
) → FlintThemeMode - Toggles between light and dark mode.
-
toString(
) → String -
A string representation of this object.
inherited
-
useDark(
) → void - Switches to dark mode.
-
useLight(
) → void - Switches to light mode.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited