ThemeService class final
Service for managing application themes and theme switching.
This service provides functionality to:
- Switch between light and dark themes
- Toggle between themes
- Configure theme data for different theme modes
- Access current theme mode and theme data
Uses MobX for reactive theme state management.
Constructors
Properties
-
currentMode
→ Observable<
ThemeMode> -
The current theme mode (light/dark) as an observable value.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
changeTheme(
ThemeMode mode) → void - Changes the current theme mode to the specified mode.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setThemes(
Map< ThemeMode, ThemeData> themes) → void - Configures theme data for different theme modes.
-
theme(
ThemeMode mode) → ThemeData? - Gets the theme data for the specified theme mode.
-
toggleTheme(
) → void - Toggles between light and dark themes.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited