copyWith method

DashedDecoration copyWith({
  1. Color? color,
  2. DecorationImage? image,
  3. BoxBorder? border,
  4. BorderRadiusGeometry? borderRadius,
  5. List<BoxShadow>? boxShadow,
  6. Gradient? gradient,
  7. BlendMode? backgroundBlendMode,
  8. BoxShape? shape,
  9. double? strokeWidth = 1.0,
  10. double? gap = 5.0,
  11. Color? dashedColor,
  12. bool? dawDashed,
})

Creates a copy of this object but with the given fields replaced with the new values.

Implementation

DashedDecoration copyWith({
  Color? color,
  DecorationImage? image,
  BoxBorder? border,
  BorderRadiusGeometry? borderRadius,
  List<BoxShadow>? boxShadow,
  Gradient? gradient,
  BlendMode? backgroundBlendMode,
  BoxShape? shape,
  double? strokeWidth = 1.0,
  double? gap = 5.0,
  Color? dashedColor,
  bool? dawDashed,
}) {
  return DashedDecoration(
    color: color ?? this.color,
    image: image ?? this.image,
    border: border ?? this.border,
    borderRadius: borderRadius ?? this.borderRadius,
    boxShadow: boxShadow ?? this.boxShadow,
    gradient: gradient ?? this.gradient,
    backgroundBlendMode: backgroundBlendMode ?? this.backgroundBlendMode,
    shape: shape ?? this.shape,
    strokeWidth: strokeWidth ?? this.strokeWidth,
    gap: gap ?? this.gap,
    dashedColor: dashedColor ?? this.dashedColor,
  );
}