copyWith method
BoxStyle
copyWith({
- String? name,
- Border? border,
- Color? borderColor,
- BorderRadius? borderRadius,
- Color? color,
- BoxDecoration? decoration,
- double? height,
- EdgeInsets? padding,
- Color? textColor,
- double? textSize,
- TextStyle? textStyle,
- FontWeight? textWeight,
- double? width,
- Box? activeStyle,
- Box? disabledStyle,
- Box? errorStyle,
- Box? hoverStyle,
Implementation
BoxStyle copyWith({
String? name,
Border? border,
Color? borderColor,
BorderRadius? borderRadius,
Color? color,
BoxDecoration? decoration,
double? height,
EdgeInsets? padding,
Color? textColor,
double? textSize,
TextStyle? textStyle,
FontWeight? textWeight,
double? width,
Box? activeStyle,
Box? disabledStyle,
Box? errorStyle,
Box? hoverStyle,
}) {
return BoxStyle(
name: name ?? this.name,
color: color ?? this.color,
padding: padding ?? this.padding,
decoration: decoration ?? this.decoration,
border: border ?? this.border,
borderRadius: borderRadius ?? this.borderRadius,
borderColor: borderColor ?? this.borderColor,
textColor: textColor ?? this.textColor,
textSize: textSize ?? this.textSize,
textWeight: textWeight ?? this.textWeight,
textStyle: this.textStyle.merge(textStyle),
height: height ?? this.height,
width: width ?? this.width,
hoverStyle: this.hoverStyle.merge([hoverStyle]),
activeStyle: this.activeStyle.merge([activeStyle]),
errorStyle: this.errorStyle.merge([errorStyle]),
disabledStyle: this.disabledStyle.merge([disabledStyle]),
);
}