BaseThemeConfig<T> class
Base theme config is used for theme management. Set the required parameters to create new themes.
Example:
BaseThemeConfig<ColorStyles>(
id: 'light_theme',
description: 'Light theme',
theme: (colors) => ThemeData.light().copyWith(
primaryColor: colors.primaryAccent,
scaffoldBackgroundColor: colors.background,
),
colors: LightThemeColors(),
type: NyThemeType.light,
)
Constructors
- BaseThemeConfig({required String id, required ThemeData theme(T colorStyles), required T colors, NyThemeType type = NyThemeType.light})
- Create a new BaseThemeConfig.
Properties
- colors → T
-
Color styles instance for this theme.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for the theme.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- theme → ThemeData Function(T colorStyles)
-
Function that generates ThemeData from color styles.
final
- themeData → ThemeData
-
Get the ThemeData for this theme.
no setter
- type → NyThemeType
-
Whether this is a light or dark theme.
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