ThemeSharedPreferences class
Constructors
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
-
getTheme(
) → Future< bool> - Retrieves the current theme from SharedPreferences as a boolean value.
-
getThemeMode(
) → Future< ThemeMode> - Retrieves the current ThemeMode from SharedPreferences.
-
isFirstRun(
) → Future< bool?> - Checks if the app is being run for the first time.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setFirstRun(
{required bool value}) → Future< void> -
Persists the given
value
to SharedPreferences as a boolean indicating whether this is the first time the app has been run. -
setTheme(
{required bool isDark}) → Future< void> -
Persists the given
isDark
to SharedPreferences as the app's theme. -
setThemeMode(
ThemeMode mode) → Future< void> - Persists the given ThemeMode to SharedPreferences.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- firstRunKey → const String
- themeKey → const String
- themeModeKey → const String