DashedDecoration constructor

const DashedDecoration({
  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 = BoxShape.rectangle,
  9. double? strokeWidth = 1.0,
  10. double? gap = 5.0,
  11. Color? dashedColor,
  12. bool? drawDashed = true,
})

Creates a box decoration.

The shape argument must not be null.

Implementation

const DashedDecoration({
  this.color,
  this.image,
  this.border,
  this.borderRadius,
  this.boxShadow,
  this.gradient,
  this.backgroundBlendMode,
  this.shape = BoxShape.rectangle,
  this.strokeWidth = 1.0,
  this.gap = 5.0,
  this.dashedColor,
  this.drawDashed = true,
})  : assert(shape != null),
      assert(
          backgroundBlendMode == null || color != null || gradient != null,
          "backgroundBlendMode applies to DashedDecoration's background color or "
          'gradient, but no color or gradient was provided.');