Theme factory for the design system.
Provides opinionated, production-ready Material 3 themes:
MaterialApp(
theme: Theme.light(),
darkTheme: Theme.dark(),
themeMode: ThemeMode.system,
)
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 Methods
-
amoled(
{String? fontFamily, bool useGoogleFonts = true, Color? seedColor, AppThemeExtension? extension, FontConfig? fontConfig, TextDirection direction = TextDirection.ltr}) → ThemeData - True-black (AMOLED) theme.
-
custom(
{required ColorScheme colorScheme, String? fontFamily, bool useGoogleFonts = true, AppThemeExtension? extension, FontConfig? fontConfig, TextDirection direction = TextDirection.ltr}) → ThemeData - Builds a fully custom theme from a provided ColorScheme.
-
dark(
{String? fontFamily, bool useGoogleFonts = true, Color? seedColor, AppThemeExtension? extension, FontConfig? fontConfig, TextDirection direction = TextDirection.ltr}) → ThemeData - Dark theme built from the brand palette.
-
light(
{String? fontFamily, bool useGoogleFonts = true, Color? seedColor, AppThemeExtension? extension, FontConfig? fontConfig, TextDirection direction = TextDirection.ltr}) → ThemeData - Light theme built from the brand palette.
-
of(
BuildContext context) → ThemeData - Retrieves the current ThemeData from the nearest Theme ancestor.