MkxTheme class
A utility class providing predefined themes and theme customization
This class contains light and dark theme presets that can be used directly with MaterialApp, as well as methods to customize these themes.
Basic usage example:
MaterialApp(
theme: MkxTheme.light,
darkTheme: MkxTheme.dark,
themeMode: ThemeMode.system, // Use system theme mode
)
Example with custom theme:
// Create custom theme
final customTheme = MkxTheme.applyCustomTheme(
MkxTheme.light,
MkxThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.teal,
brightness: Brightness.light,
),
),
);
// Use in MaterialApp
MaterialApp(
theme: customTheme,
darkTheme: MkxTheme.dark,
themeMode: ThemeMode.system,
)
Constructors
- MkxTheme()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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 Properties
Static Methods
-
applyCustomTheme(
ThemeData baseTheme, MkxThemeData customData) → ThemeData - Applies custom theme data to a base theme