AppThemeExtension class
Custom theme extension that defines application-specific design tokens.
This class extends ThemeExtension to allow custom styling properties (such as colors, shapes,
and text styles) to be accessed through the ThemeData object. It enables developers to define
a consistent design system across the app using Flutter's built-in theming capabilities [4
].
- Inheritance
-
- Object
- ThemeExtension<
AppThemeExtension> - AppThemeExtension
- Implementers
Constructors
- AppThemeExtension.new({required Color primary, required Color onPrimary, required Color secondary, required Color onSecondary, required Color error, required Color onError, required Color surface, required Color onSurface, required Color onSurfaceSecondary, double buttonBorderRadius = _buttonCornerRadiusValue, double outlinedButtonBorderWidth = _outlinedButtonBorderWidthValue, double textFormFieldBorderRadius = _textFormFieldBorderRadiusValue, double textFormFieldBorderSide = _textFormFieldBorderSideValue, double textFormFieldFocusedBorderSideValue = _textFormFieldFocusedBorderSideValue, double buttonMinSizeHeight = _buttonMinSizeHeightValue, double textFormFieldFocusedBorderSideWidth = _textFormFieldFocusedBorderSideWidthValue, required Color displayTextSmallColor, required Color displayTextMediumColor, required Color displayTextLargeColor, required Color titleTextSmallColor, required Color titleTextMediumColor, required Color titleTextLargeColor, required Color bodyTextSmallColor, required Color bodyTextMediumColor, required Color bodyTextLargeColor, required Color headlineTextSmallColor, required Color headlineTextMediumColor, required Color headlineTextLargeColor, required Color labelTextSmallColor, required Color labelTextMediumColor, required Color labelTextLargeColor, required Color warningColor, required Color infoColor, required Color successColor})
- Creates an instance of AppThemeExtension.
Properties
- bodyTextLargeColor → Color
-
final
- bodyTextMediumColor → Color
-
final
- bodyTextSmallColor → Color
-
final
-
final
-
Returns a fixed-size dimension for buttons.
no setter
-
final
- displayTextLargeColor → Color
-
final
- displayTextMediumColor → Color
-
final
- displayTextSmallColor → Color
-
final
- error → Color
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headlineTextLargeColor → Color
-
final
- headlineTextMediumColor → Color
-
final
- headlineTextSmallColor → Color
-
final
- infoColor → Color
-
final
- labelTextLargeColor → Color
-
final
- labelTextMediumColor → Color
-
final
- labelTextSmallColor → Color
-
final
- onError → Color
-
final
- onPrimary → Color
-
final
- onSecondary → Color
-
final
- onSurface → Color
-
final
- onSurfaceSecondary → Color
-
final
- outlinedButtonBorderWidth → double
-
final
- primary → Color
-
final
- roundedRectangleShape → RoundedRectangleBorder
-
Returns a rounded rectangle border shape based on current corner radius.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondary → Color
-
final
- successColor → Color
-
final
- surface → Color
-
final
- textFormFieldBorderRadius → double
-
final
- textFormFieldBorderSide → double
-
final
- textFormFieldFocusedBorderSideValue → double
-
final
- textFormFieldFocusedBorderSideWidth → double
-
final
- titleTextLargeColor → Color
-
final
- titleTextMediumColor → Color
-
final
- titleTextSmallColor → Color
-
final
- type → Object
-
The extension's type.
no setterinherited
- warningColor → Color
-
final
Methods
-
copyWith(
) → ThemeExtension< AppThemeExtension> -
Creates a copy of this theme extension with the given fields
replaced by the non-null parameter values.
override
-
lerp(
covariant ThemeExtension< AppThemeExtension> ? other, double t) → ThemeExtension<AppThemeExtension> -
Linearly interpolate with another ThemeExtension object.
override
-
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
-
Exposes the default minimum height value for buttons.
no setter