line static method

Path line({
  1. required Offset from,
  2. required Offset to,
  3. Path? path,
})

A line path function.

This functions can either return a new path or add to existing path.

Implementation

static Path line({
  required Offset from,
  required Offset to,
  Path? path,
}) =>
    (path ?? Path())
      ..moveTo(from.dx, from.dy)
      ..lineTo(to.dx, to.dy);