copyWith method
CartButtonStyle
copyWith({
- Color? activeForegroundColor,
- Color? activeBackgroundColor,
- Color? foregroundColor,
- Color? backgroundColor,
- BoxShape? shape,
- Radius? radius,
- BoxBorder? border,
- bool noBorder = false,
- Color? shadowColor,
- TextStyle? textStyle,
- IconThemeData? iconTheme,
- IconData? iconPlus,
- IconData? iconMinus,
- double? buttonAspectRatio,
- double? elevation,
Implementation
CartButtonStyle copyWith({
Color? activeForegroundColor,
Color? activeBackgroundColor,
Color? foregroundColor,
Color? backgroundColor,
BoxShape? shape,
Radius? radius,
BoxBorder? border,
bool noBorder = false,
Color? shadowColor,
TextStyle? textStyle,
IconThemeData? iconTheme,
IconData? iconPlus,
IconData? iconMinus,
double? buttonAspectRatio,
double? elevation,
}) {
return CartButtonStyle(
activeForegroundColor:
activeForegroundColor ?? this.activeForegroundColor,
activeBackgroundColor:
activeBackgroundColor ?? this.activeBackgroundColor,
foregroundColor: foregroundColor ?? this.foregroundColor,
backgroundColor: backgroundColor ?? this.backgroundColor,
shape: shape ?? this.shape,
radius: radius ?? this.radius,
border: noBorder ? null : (border ?? this.border),
shadowColor: shadowColor ?? this.shadowColor,
textStyle: textStyle ?? this.textStyle,
iconTheme: iconTheme ?? this.iconTheme,
iconPlus: iconPlus ?? this.iconPlus,
iconMinus: iconMinus ?? this.iconMinus,
buttonAspectRatio: buttonAspectRatio ?? this.buttonAspectRatio,
elevation: elevation ?? this.elevation,
);
}