draw method

  1. @override
void draw(
  1. Canvas canvas
)
override

Renders the element on the canvas, at coordinates determined during the layout.

In order to render the element at a different location, consider either calling the translate method, or applying a translation transform to the canvas itself.

Implementation

@override
void draw(Canvas canvas) {
  canvas.drawRect(_rect, _paint);
}