copyWith method
WrapperModel
copyWith({
- WrapperType? wrapperType,
- EdgeInsets? padding,
- EdgeInsets? margin,
- double? borderRadius,
- Color? backgroundColor,
- Color? borderColor,
- double? borderWidth,
- double? elevation,
- double? blurX,
- double? blurY,
- Color? shadowLightColor,
- Color? shadowDarkColor,
- Gradient? gradient,
Enables easy state updates
Implementation
WrapperModel copyWith({
WrapperType? wrapperType,
EdgeInsets? padding,
EdgeInsets? margin,
double? borderRadius,
Color? backgroundColor,
Color? borderColor,
double? borderWidth,
double? elevation,
double? blurX,
double? blurY,
Color? shadowLightColor,
Color? shadowDarkColor,
Gradient? gradient,
}) {
return WrapperModel(
wrapperType: wrapperType ?? this.wrapperType,
padding: padding ?? this.padding,
margin: margin ?? this.margin,
borderRadius: borderRadius ?? this.borderRadius,
backgroundColor: backgroundColor ?? this.backgroundColor,
borderColor: borderColor ?? this.borderColor,
borderWidth: borderWidth ?? this.borderWidth,
elevation: elevation ?? this.elevation,
blurX: blurX ?? this.blurX,
blurY: blurY ?? this.blurY,
shadowLightColor: shadowLightColor ?? this.shadowLightColor,
shadowDarkColor: shadowDarkColor ?? this.shadowDarkColor,
gradient: gradient ?? this.gradient,
);
}