DashedShapePainter constructor

DashedShapePainter({
  1. required double strokeWidth,
  2. required double dashWidth1,
  3. required double dashSpace1,
  4. required Color strokeColor,
  5. required Shape shape,
  6. double? borderRadius,
})

Creates a DashedShapePainter with the given properties.

  • strokeWidth: The width of the dashed stroke as a percentage of the shape's size.
  • dashWidth1: The width of each dash as a percentage of the shape's size.
  • dashSpace1: The space between dashes as a percentage of the shape's size.
  • strokeColor: The color of the dashed stroke.
  • shape: The shape to be drawn (CIRCLE or SQUARE).
  • borderRadius: The border radius for rounded rectangles. Ignored for circles.

Implementation

DashedShapePainter({
  required this.strokeWidth,
  required this.dashWidth1,
  required this.dashSpace1,
  required this.strokeColor,
  required this.shape,
  this.borderRadius,
});