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