XTheme class

Class that defines the theme for the app.

Inheritance

Constructors

XTheme({required String id, required String name, required ThemeData themeData, CupertinoThemeData? cupertinoThemeData, PlayxColors colors = const DefaultColors(), bool isDark = false})
const
XTheme.builder({required String id, required String name, required ThemeData initialTheme, required ThemeData themeBuilder(Locale? locale)?, CupertinoThemeData cupertinoThemeBuilder(Locale? locale)?, PlayxColors colors = const DefaultColors(), bool isDark = false})
const

Properties

colors PlayxColors
color scheme for the theme which provides custom colors for each theme.
final
cupertinoThemeBuilder CupertinoThemeData Function(Locale? locale)?
Defines the configuration of the overall visual Theme for a CupertinoApp or a widget subtree within the app. This is used to provide a custom theme for the app based on the locale.
final
cupertinoThemeData CupertinoThemeData?
Defines the configuration of the overall visual Theme for a CupertinoApp or a widget subtree within the app.
final
hashCode int
The hash code for this object.
no setterinherited
id String
id for the theme.
final
isDark bool
Defines Whether the provided theme is dark or not.
final
name String
Defines theme name.
final
props List<Object>
The list of properties that will be used to determine whether two instances are equal.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool
If set to true, the toString method will be overridden to output this instance's props.
no setteroverride
themeBuilder ThemeData Function(Locale? locale)?
Defines the configuration of the overall visual Theme for a MaterialApp or a widget subtree within the app. This can be used to provide a custom theme for the app based on the locale.
final
themeData ThemeData
Defines the configuration of the overall visual Theme for a MaterialApp or a widget subtree within the app.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

maybeOf(BuildContext context) XTheme?
of(BuildContext context) XTheme