drawObject method

  1. @override
void drawObject(
  1. Canvas canvas,
  2. Size size
)
override

Draws the line on the provided canvas of size size.

Implementation

@override
void drawObject(Canvas canvas, Size size) {
  canvas.drawLine(position.translate(-length / 2 * scale, 0),
      position.translate(length / 2 * scale, 0), paint);
}