copyWith method
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,
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,
);
}