ThemesManager class

Inheritance

Constructors

ThemesManager({Key? key, String id = 'app', bool keepSettingOnDisableFollow = false, ThemeMode themeMode = ThemeMode.system, String? defaultLightTheme, String? defaultDarkTheme, String? defaultCupertinoTheme, String? defaultCustomData, List<ThemeManagerData>? themes, List<CupertinoThemeManagerData>? cupertinoThemes, List<CustomThemeManagerData>? customData, Color? appColor, required Widget child})
ThemesManager is best used as parent of MaterialApp or CupertinoApp or WidgetsApp,

Properties

appColor Color?
give a color to the WidgetsApp theme manager uses internally.
final
child Widget
child widget (wrap it with a build function to correctly get the context)
final
cupertinoThemes List<CupertinoThemeManagerData>?
All your CupertinoThemeManagerData in a list
final
customData List<CustomThemeManagerData>?
All your CustomThemeManagerData in a list
final
defaultCupertinoTheme String?
use to set a cupertino theme on start of an app. gets overwritten by system store.
final
defaultCustomData String?
sets default CustomData, sets to first available data if null. gets overwritten by system store.
final
defaultDarkTheme String?
use to set a dark theme on start of an app. gets overwritten by system store.
final
defaultLightTheme String?
use to set a light theme on start of an app. gets overwritten by system store.
final
hashCode int
The hash code for this object.
no setterinherited
id String
set an id, if using multiple ThemeManger
final
keepSettingOnDisableFollow bool
keep the previous setting (if available), when ThemeMode change from ThemeMode.system
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
themeMode ThemeMode
use to sets initial theme mode on start of app. gets overwritten by system store.
final
themes List<ThemeManagerData>?
All your ThemeManagerData in a list
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() ThemesManagerState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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

Static Methods

cupertinoThemeOf(BuildContext context) CupertinoThemeData
get current CupertinoThemeData of current ThemeManger
customDataOf<T>(BuildContext context, [ThemeType type = ThemeType.custom]) → T?
customData could be null. always check for null before using.
of(BuildContext context) ThemesManagerState?
get state of ThemeManger of current context.
themeOf(BuildContext context) ThemeData
get current ThemeData of current ThemeManger