copyWith method

WrapperModel copyWith({
  1. WrapperType? wrapperType,
  2. EdgeInsets? padding,
  3. EdgeInsets? margin,
  4. double? borderRadius,
  5. Color? backgroundColor,
  6. Color? borderColor,
  7. double? borderWidth,
  8. double? elevation,
  9. double? blurX,
  10. double? blurY,
  11. Color? shadowLightColor,
  12. Color? shadowDarkColor,
  13. 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,
  );
}