CardThemeData class

Defines default property values for descendant Card widgets.

Descendant widgets obtain the current CardThemeData object using CardTheme.of(context). Instances of CardThemeData can be customized with CardThemeData.copyWith.

Typically a CardThemeData is specified as part of the overall Theme with ThemeData.cardTheme.

All CardThemeData properties are null by default. When null, the Card will use the values from ThemeData if they exist, otherwise it will provide its own defaults. See the individual Card properties for details.

See also:

  • ThemeData, which describes the overall theme information for the application.
Mixed-in types
Annotations

Constructors

CardThemeData({Clip? clipBehavior, Color? color, Color? shadowColor, Color? surfaceTintColor, double? elevation, EdgeInsetsGeometry? margin, ShapeBorder? shape})
Creates a theme that can be used for ThemeData.cardTheme.
const

Properties

clipBehavior Clip?
Overrides the default value for Card.clipBehavior.
final
color Color?
Overrides the default value for Card.color.
final
elevation double?
Overrides the default value for Card.elevation.
final
hashCode int
The hash code for this object.
no setteroverride
margin EdgeInsetsGeometry?
Overrides the default value for Card.margin.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowColor Color?
Overrides the default value for Card.shadowColor.
final
shape ShapeBorder?
Overrides the default value for Card.shape.
final
surfaceTintColor Color?
Overrides the default value for Card.surfaceTintColor.
final

Methods

copyWith({Clip? clipBehavior, Color? color, Color? shadowColor, Color? surfaceTintColor, double? elevation, EdgeInsetsGeometry? margin, ShapeBorder? shape}) CardThemeData
Creates a copy of this object with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

lerp(CardThemeData? a, CardThemeData? b, double t) CardThemeData
Linearly interpolate between two Card themes.