ThemeService class

A service accessible outside of the UI to allow the control of the ThemeManager

Constructors

ThemeService()

Properties

hashCode int
The hash code for this object.
no setterinherited
isDarkMode bool
Returns true if the ThemeMode is dark. This does not apply when you're using system as ThemeMode
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedThemeMode ThemeManagerMode
Returns the selected theme mode
no setter
themeCount int
Returns the number of themes supplied to the ThemeBuilder
no setter

Methods

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
setThemeManager(ThemeManager manager) → void
Sets the theme manager instance that will be used from the service
setThemeMode(ThemeManagerMode themeManagerMode) → void
Sets the theme mode on the ThemeManager
toggleDarkLightTheme() → void
Swaps between the light and dark ThemeMode if the defaultThemeMode supplied to the ThemeBuilder is not ThemeMode.system
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

getInstance() ThemeService