SdChipThemeData class
Global theme configuration for the chip system.
- Inheritance
-
- Object
- ThemeExtension<
SdChipThemeData> - SdChipThemeData
- Annotations
Constructors
- SdChipThemeData({Color? backgroundColor, Color? selectedColor, Color? disabledColor, Color? textColor, Color? selectedTextColor, Color? disabledTextColor, Color? borderColor, Color? selectedBorderColor, Color? disabledBorderColor, TextStyle? textStyle, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, BorderRadiusGeometry? borderRadius, double iconSize = 18, double elevation = 0, double selectedElevation = 8, double borderWidth = 1, double selectedBorderWidth = 1.2, Duration duration = const Duration(milliseconds: 220), Curve curve = Curves.easeOutCubic, double pressedScale = 0.97, Color? shadowColor})
-
Creates chip theme data.
const
- SdChipThemeData.dark(ThemeData theme)
-
Creates a dark theme from the host ThemeData.
factory
- SdChipThemeData.light(ThemeData theme)
-
Creates a production-oriented light theme from the host ThemeData.
factory
Properties
- backgroundColor → Color?
-
Default background color.
final
- borderColor → Color?
-
Default border color.
final
- borderRadius → BorderRadiusGeometry?
-
Default border radius.
final
- borderWidth → double
-
Default border width.
final
- curve → Curve
-
Shared animation curve.
final
- defaultStyle → ChipStyle
-
A reusable ChipStyle generated from the theme data.
no setter
- disabledBorderColor → Color?
-
Disabled border color.
final
- disabledColor → Color?
-
Disabled background color.
final
- disabledStyle → ChipStyle
-
A reusable disabled style view.
no setter
- disabledTextColor → Color?
-
Disabled text color.
final
- duration → Duration
-
Shared animation duration.
final
- elevation → double
-
Default elevation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconSize → double
-
Default icon size.
final
- margin → EdgeInsetsGeometry?
-
Default external margin.
final
- padding → EdgeInsetsGeometry?
-
Default padding.
final
- pressedScale → double
-
Shared press scale.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedBorderColor → Color?
-
Selected border color.
final
- selectedBorderWidth → double
-
Selected border width.
final
- selectedColor → Color?
-
Selected background color.
final
- selectedElevation → double
-
Elevation for selected chips.
final
- selectedStyle → ChipStyle
-
A reusable selected style view.
no setter
- selectedTextColor → Color?
-
Selected text color.
final
- shadowColor → Color?
-
Shared shadow color.
final
- style → ChipStyle
-
Backward-compatible alias for the default style.
no setter
- textColor → Color?
-
Default text color.
final
- textStyle → TextStyle?
-
Default text style.
final
- type → Object
-
The extension's type.
no setterinherited
Methods
-
copyWith(
{Color? backgroundColor, Color? selectedColor, Color? disabledColor, Color? textColor, Color? selectedTextColor, Color? disabledTextColor, Color? borderColor, Color? selectedBorderColor, Color? disabledBorderColor, TextStyle? textStyle, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, BorderRadiusGeometry? borderRadius, double? iconSize, double? elevation, double? selectedElevation, double? borderWidth, double? selectedBorderWidth, Duration? duration, Curve? curve, double? pressedScale, Color? shadowColor}) → SdChipThemeData -
Creates a copy of this theme extension with the given fields
replaced by the non-null parameter values.
override
-
lerp(
covariant ThemeExtension< SdChipThemeData> ? other, double t) → ThemeExtension<SdChipThemeData> -
Linearly interpolate with another ThemeExtension object.
override
-
merge(
SdChipThemeData? other) → SdChipThemeData -
Creates a merged theme using
otheras overrides. -
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
-
resolve(
BuildContext context) → SdChipThemeData - Resolves the effective theme from the current BuildContext.