copyWith method

CardThemeData copyWith({
  1. Clip? clipBehavior,
  2. Color? color,
  3. Color? shadowColor,
  4. Color? surfaceTintColor,
  5. double? elevation,
  6. EdgeInsetsGeometry? margin,
  7. ShapeBorder? shape,
})

Creates a copy of this object with the given fields replaced with the new values.

Implementation

CardThemeData copyWith({
  Clip? clipBehavior,
  Color? color,
  Color? shadowColor,
  Color? surfaceTintColor,
  double? elevation,
  EdgeInsetsGeometry? margin,
  ShapeBorder? shape,
}) {
  return CardThemeData(
    clipBehavior: clipBehavior ?? this.clipBehavior,
    color: color ?? this.color,
    shadowColor: shadowColor ?? this.shadowColor,
    surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
    elevation: elevation ?? this.elevation,
    margin: margin ?? this.margin,
    shape: shape ?? this.shape,
  );
}