copyWith method
Internal copyWith for BoxDecoration
Implementation
BoxDecoration copyWith({
Color? color,
Border? border,
BorderRadiusGeometry? borderRadius,
List<BoxShadow>? boxShadow,
Gradient? gradient,
BoxShape? shape,
}) {
return BoxDecoration(
color: color ?? this.color,
border: border ?? this.border,
borderRadius:
shape == BoxShape.circle ? null : borderRadius ?? this.borderRadius,
boxShadow: boxShadow ?? this.boxShadow,
gradient: gradient ?? this.gradient,
shape: shape ?? this.shape,
);
}