ThemesManagerState class
Methods
-
activate()
→ void
-
Called when this object is reinserted into the tree after having been
removed via deactivate.
inherited
-
addToCustomData(CustomThemeManagerData data)
→ void
-
Add additional customData later in the app
always make sure ThemesManager exist above your builder function
-
build(BuildContext context)
→ Widget
-
Describes the part of the user interface represented by this widget.
override
-
checkDark()
→ bool
-
check current theme is dark or not.
if themeMode is ThemeMode.system check current ThemeMode of
system
.
-
checkIfCurrent(String key)
→ bool
-
check if theme is currently applied
-
checkIfDefault(String key)
→ bool
-
check if a theme is currently default or not.
-
deactivate()
→ void
-
Called when this object is removed from the tree.
inherited
-
debugFillProperties(DiagnosticPropertiesBuilder properties)
→ void
-
Add additional properties associated with the node.
inherited
-
didChangeDependencies()
→ void
-
Called when a dependency of this State object changes.
inherited
-
didUpdateWidget(covariant ThemesManager oldWidget)
→ void
-
Called whenever the widget configuration changes.
inherited
-
dispose()
→ void
-
Called when this object is removed from the tree permanently.
inherited
-
generateCupertinoTheme(CupertinoThemeManagerData themeData)
→ void
-
Make sure ThemesManager exist in the widget tree, above of the widget where you are trying to add new themes.
-
generateTheme(ThemeManagerData themeData)
→ void
-
Make sure ThemesManager exist in the widget tree and your are in the correct BuildContext.
-
initState()
→ void
-
Called when this object is inserted into the tree.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
reassemble()
→ void
-
Called whenever the application is reassembled during debugging, for
example during hot reload.
inherited
-
resetAll()
→ Future<bool>
-
reset every settings throughout the whole app.
-
resetSettings()
→ Future<void>
-
reset every settings, Go back to hard coded settings.
-
setCupertinoTheme(String themeKey)
→ void
-
set default theme for cupertinoTheme
-
setCurrentCustomData(String key)
→ void
-
set current active customData
-
setDarkMode(bool value)
→ void
-
set themeMode to ThemeMode.dark or ThemeMode.light by passing
value
-
setDarkTheme(String themeKey, {bool apply = false})
→ void
-
set default theme for darkTheme
-
setLightTheme(String themeKey, {bool apply = false})
→ void
-
set default theme for lightTheme
-
setState(VoidCallback fn)
→ void
-
Notify the framework that the internal state of this object has changed.
inherited
-
setTheme(String themeKey, {bool apply = false, bool both = false})
→ void
-
set default themes for darkTheme or lightTheme
-
setThemeModeToSystem(bool value)
→ void
-
set themeMode value to ThemeMode.system by passing
true
,
or pass false
to change themeMode to ThemeMode.dark or ThemeMode.light
-
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style})
→ DiagnosticsNode
-
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toggleDarkMode()
→ void
-
toggle between ThemeMode.dark and ThemeMode.light
-
toString({DiagnosticLevel minLevel = DiagnosticLevel.info})
→ String
-
A string representation of this object.
inherited
-
toStringShort()
→ String
-
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited