ThemeService class

Service for managing theme preferences and persistence.

Constructors

ThemeService.new(SharedPreferences _prefs)
Creates a new ThemeService instance.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getThemeMode() ThemeMode
Gets the current theme mode from shared preferences. Returns ThemeMode.dark as default if no preference is set.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setThemeMode(ThemeMode themeMode) Future<void>
Sets the theme mode and saves it to shared preferences.
toggleTheme() Future<ThemeMode>
Toggles between light and dark theme modes. Returns the new theme mode.
toString() String
A string representation of this object.
inherited

Operators

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