drawDashedLine method

void drawDashedLine(
  1. Offset from,
  2. Offset to,
  3. Paint painter,
  4. List<int>? dashArray,
)

Draws a dashed line from passed in offsets

Implementation

void drawDashedLine(
  Offset from,
  Offset to,
  Paint painter,
  List<int>? dashArray,
) {
  var path = Path()
    ..moveTo(from.dx, from.dy)
    ..lineTo(to.dx, to.dy);
  path = path.toDashedPath(dashArray);
  drawPath(path, painter);
}