ThemeManager class
Provides functionality to manage the current theme for the application
Constructors
Properties
- darkTheme → ThemeData?
-
The theme to be used when not using the lightTheme
final
- defaultTheme → ThemeMode
-
The default theme mode to use for the application when the application is frst used.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialTheme → ThemeModel
-
no setter
- isDarkMode → bool
-
Returns true if the ThemeMode is dark. This does not apply when you're using system as ThemeMode
no setter
- lightTheme → ThemeData?
-
The theme to be used when not using the darkTheme
final
-
A builder function that provides you with the new selected theme that expects you to
return a color for the navigation bar.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedThemeIndex → int?
-
Get currently selected theme
no setter
- selectedThemeMode → ThemeMode?
-
Returns the current selected theme mode
no setter
- statusBarColorBuilder → (Color? Function(ThemeData?)?)
-
A builder function that provides you with the new selected theme that expects you to
return a color for the status bar.
final
-
themes
→ List<
ThemeData> ? -
A list of themes that the application can swap to
final
-
themesStream
→ Stream<
ThemeModel> -
no setter
Methods
-
getSelectedTheme(
) → ThemeModel -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
selectThemeAtIndex(
int themeIndex) → Future - Sets the theme for the application equal to the theme at the index in the list of themes supplied to the ThemeBuilder
-
setThemeMode(
ThemeMode themeMode) → void -
toggleDarkLightTheme(
[bool disablePersistence = false]) → void - Swaps between the light and dark ThemeMode
-
toString(
) → String -
A string representation of this object.
inherited
-
updateOverlayColors(
ThemeData? theme) → Future< void>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
initialise(
) → Future - Has to be called before we make use of the theme manager