copyWith method

Box copyWith({
  1. Key? key,
  2. bool? show,
  3. Color? color,
  4. EdgeInsetsGeometry? padding,
  5. double? width,
  6. double? height,
  7. AlignmentGeometry? alignment,
  8. bool? random,
  9. 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,
  );
}