copyWith method

  1. @override
ChipThemeData copyWith({
  1. Curve? curve,
  2. Duration? duration,
  3. IconData? deleteIcon,
  4. ChipStyle? style,
  5. ChipStyleByVariant? variantStyle,
  6. ChipStyleByVariant? dangerStyle,
  7. ChipStyleByVariant? warningStyle,
  8. ChipStyleByVariant? successStyle,
  9. ChipStyleByVariant? infoStyle,
})
override

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

Implementation

@override
ChipThemeData copyWith({
  Curve? curve,
  Duration? duration,
  IconData? deleteIcon,
  ChipStyle? style,
  ChipStyleByVariant? variantStyle,
  ChipStyleByVariant? dangerStyle,
  ChipStyleByVariant? warningStyle,
  ChipStyleByVariant? successStyle,
  ChipStyleByVariant? infoStyle,
}) {
  return ChipThemeData(
    curve: curve ?? this.curve,
    duration: duration ?? this.duration,
    deleteIcon: deleteIcon ?? this.deleteIcon,
    style: this.style.merge(style),
    variantStyle: this.variantStyle.merge(variantStyle),
    dangerStyle: this.dangerStyle.merge(dangerStyle),
    warningStyle: this.warningStyle.merge(warningStyle),
    successStyle: this.successStyle.merge(successStyle),
    infoStyle: this.infoStyle.merge(infoStyle),
  );
}