CardTheme class

Theme data for customizing Card and SurfaceCard widget appearance.

This class defines the visual properties that can be applied to card widgets, including padding, fill behavior, colors, borders, shadows, and surface effects. These properties can be set at the theme level to provide consistent styling across the application.

The theme affects both regular cards and surface cards, with surface cards supporting additional blur and opacity effects for glassmorphism styling.

Constructors

CardTheme.new({EdgeInsetsGeometry? padding, bool? filled, Color? fillColor, BorderRadiusGeometry? borderRadius, Color? borderColor, double? borderWidth, Clip? clipBehavior, List<BoxShadow>? boxShadow, double? surfaceOpacity, double? surfaceBlur, Duration? duration})
Creates a CardTheme.
const

Properties

borderColor Color?
Border color of the card.
final
borderRadius BorderRadiusGeometry?
Border radius of the card.
final
borderWidth double?
Border width of the card.
final
boxShadow List<BoxShadow>?
Box shadow of the card.
final
clipBehavior Clip?
Clip behavior of the card.
final
duration Duration?
Animation duration for transitions.
final
fillColor Color?
The fill color when filled is true.
final
filled bool?
Whether the card is filled.
final
hashCode int
The hash code for this object.
no setteroverride
padding EdgeInsetsGeometry?
Padding inside the card.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
surfaceBlur double?
Surface blur for blurred background.
final
surfaceOpacity double?
Surface opacity for blurred background.
final

Methods

copyWith({ValueGetter<EdgeInsetsGeometry?>? padding, ValueGetter<bool?>? filled, ValueGetter<Color?>? fillColor, ValueGetter<BorderRadiusGeometry?>? borderRadius, ValueGetter<Color?>? borderColor, ValueGetter<double?>? borderWidth, ValueGetter<Clip?>? clipBehavior, ValueGetter<List<BoxShadow>?>? boxShadow, ValueGetter<double?>? surfaceOpacity, ValueGetter<double?>? surfaceBlur, ValueGetter<Duration?>? duration}) CardTheme
Creates a copy of this theme with the given values replaced.
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.
override