copyWith method

ChipStyle copyWith({
  1. Color? backgroundColor,
  2. Color? selectedBackgroundColor,
  3. Color? disabledBackgroundColor,
  4. Color? textColor,
  5. Color? selectedTextColor,
  6. Color? disabledTextColor,
  7. Color? borderColor,
  8. Color? selectedBorderColor,
  9. Color? disabledBorderColor,
  10. double? borderWidth,
  11. double? selectedBorderWidth,
  12. EdgeInsetsGeometry? padding,
  13. EdgeInsetsGeometry? margin,
  14. BorderRadiusGeometry? borderRadius,
  15. double? iconSize,
  16. TextStyle? textStyle,
  17. double? elevation,
  18. double? selectedElevation,
  19. Color? shadowColor,
  20. List<Color>? gradientColors,
  21. AlignmentGeometry? gradientBegin,
  22. AlignmentGeometry? gradientEnd,
  23. Duration? duration,
  24. Curve? curve,
  25. double? pressedScale,
})

Returns a new style with the provided overrides applied.

Implementation

ChipStyle copyWith({
  Color? backgroundColor,
  Color? selectedBackgroundColor,
  Color? disabledBackgroundColor,
  Color? textColor,
  Color? selectedTextColor,
  Color? disabledTextColor,
  Color? borderColor,
  Color? selectedBorderColor,
  Color? disabledBorderColor,
  double? borderWidth,
  double? selectedBorderWidth,
  EdgeInsetsGeometry? padding,
  EdgeInsetsGeometry? margin,
  BorderRadiusGeometry? borderRadius,
  double? iconSize,
  TextStyle? textStyle,
  double? elevation,
  double? selectedElevation,
  Color? shadowColor,
  List<Color>? gradientColors,
  AlignmentGeometry? gradientBegin,
  AlignmentGeometry? gradientEnd,
  Duration? duration,
  Curve? curve,
  double? pressedScale,
}) {
  return ChipStyle(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    selectedBackgroundColor:
        selectedBackgroundColor ?? this.selectedBackgroundColor,
    disabledBackgroundColor:
        disabledBackgroundColor ?? this.disabledBackgroundColor,
    textColor: textColor ?? this.textColor,
    selectedTextColor: selectedTextColor ?? this.selectedTextColor,
    disabledTextColor: disabledTextColor ?? this.disabledTextColor,
    borderColor: borderColor ?? this.borderColor,
    selectedBorderColor: selectedBorderColor ?? this.selectedBorderColor,
    disabledBorderColor: disabledBorderColor ?? this.disabledBorderColor,
    borderWidth: borderWidth ?? this.borderWidth,
    selectedBorderWidth: selectedBorderWidth ?? this.selectedBorderWidth,
    padding: padding ?? this.padding,
    margin: margin ?? this.margin,
    borderRadius: borderRadius ?? this.borderRadius,
    iconSize: iconSize ?? this.iconSize,
    textStyle: textStyle ?? this.textStyle,
    elevation: elevation ?? this.elevation,
    selectedElevation: selectedElevation ?? this.selectedElevation,
    shadowColor: shadowColor ?? this.shadowColor,
    gradientColors: gradientColors ?? this.gradientColors,
    gradientBegin: gradientBegin ?? this.gradientBegin,
    gradientEnd: gradientEnd ?? this.gradientEnd,
    duration: duration ?? this.duration,
    curve: curve ?? this.curve,
    pressedScale: pressedScale ?? this.pressedScale,
  );
}