copyWith method

CardTheme copyWith({
  1. ValueGetter<EdgeInsetsGeometry?>? padding,
  2. ValueGetter<bool?>? filled,
  3. ValueGetter<Color?>? fillColor,
  4. ValueGetter<BorderRadiusGeometry?>? borderRadius,
  5. ValueGetter<Color?>? borderColor,
  6. ValueGetter<double?>? borderWidth,
  7. ValueGetter<Clip?>? clipBehavior,
  8. ValueGetter<List<BoxShadow>?>? boxShadow,
  9. ValueGetter<double?>? surfaceOpacity,
  10. ValueGetter<double?>? surfaceBlur,
  11. ValueGetter<Duration?>? duration,
})

Creates a copy of this theme with the given values replaced.

Implementation

CardTheme 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,
}) {
  return CardTheme(
    padding: padding == null ? this.padding : padding(),
    filled: filled == null ? this.filled : filled(),
    fillColor: fillColor == null ? this.fillColor : fillColor(),
    borderRadius: borderRadius == null ? this.borderRadius : borderRadius(),
    borderColor: borderColor == null ? this.borderColor : borderColor(),
    borderWidth: borderWidth == null ? this.borderWidth : borderWidth(),
    clipBehavior: clipBehavior == null ? this.clipBehavior : clipBehavior(),
    boxShadow: boxShadow == null ? this.boxShadow : boxShadow(),
    surfaceOpacity:
        surfaceOpacity == null ? this.surfaceOpacity : surfaceOpacity(),
    surfaceBlur: surfaceBlur == null ? this.surfaceBlur : surfaceBlur(),
    duration: duration == null ? this.duration : duration(),
  );
}