copyWith method
Box
copyWith({
- Key? key,
- bool? show,
- Color? color,
- EdgeInsetsGeometry? padding,
- double? width,
- double? height,
- AlignmentGeometry? alignment,
- bool? random,
- Widget? child,
Creates a copy of this Box but with the given fields replaced with the new values.
Implementation
Box copyWith({
Key? key,
bool? show,
Color? color,
EdgeInsetsGeometry? padding,
double? width,
double? height,
AlignmentGeometry? alignment,
bool? random,
Widget? child,
}) {
return Box._(
key: key ?? this.key,
show: show ?? this.show,
color: color ?? this.color,
padding: padding ?? this.padding,
width: width ?? this.width,
height: height ?? this.height,
alignment: alignment ?? this.alignment,
random: random ?? _random,
child: child ?? this.child,
);
}