drawLine method

void drawLine (
  1. Offset p1,
  2. Offset p2,
  3. Paint paint
)

Draws a line between the given points using the given paint. The line is stroked, the value of the Paint.style is ignored for this call.

The p1 and p2 arguments are interpreted as offsets from the origin.

Implementation

void drawLine(Offset p1, Offset p2, Paint paint) {
  assert(_offsetIsValid(p1));
  assert(_offsetIsValid(p2));
  assert(paint != null); // ignore: unnecessary_null_comparison
  _drawLine(p1.dx, p1.dy, p2.dx, p2.dy, paint._objects, paint._data);
}