drawDashedLine method
Implementation
void drawDashedLine(Canvas canvas, Offset start, Offset end) {
Offset a, b;
if (start.dy == end.dy) {
a = start.dx < end.dx ? start : end;
b = start.dx > end.dx ? start : end;
} else {
a = start;
b = end;
}
Path path = getDashedPath(a: a, b: b, gap: space);
Paint dashLinePaint = Paint();
dashLinePaint.color = paintColor;
dashLinePaint.style = PaintingStyle.stroke;
dashLinePaint.strokeWidth = thickness ?? 5;
dashLinePaint.strokeCap = StrokeCap.square;
canvas.drawPath(path, dashLinePaint);
}