ThemeManager class
Manages theming for the application.
Provides light and dark themes based on configuration, with support for dynamic theme switching.
- Inheritance
-
- Object
- ChangeNotifier
- ThemeManager
Constructors
- ThemeManager({ThemeConfig? config})
Properties
- config → ThemeConfig?
-
final
- darkTheme → ThemeData
-
The dark theme.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- lightTheme → ThemeData
-
The light theme.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- themeMode ↔ ThemeMode
-
The current theme mode.
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
-
getTheme(
Brightness brightness) → ThemeData - Gets the appropriate theme based on brightness.
-
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
-
setDarkMode(
) → void - Sets to dark mode.
-
setLightMode(
) → void - Sets to light mode.
-
setSystemMode(
) → void - Sets to system mode.
-
toggleTheme(
) → void - Toggles between light and dark mode.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited