drawRect abstract method

void drawRect({
  1. required Rect rect,
  2. Color? background,
  3. Foreground? foreground,
})

Draws a filled rectangle on the canvas.

The rectangle is defined by rect and can have optional background and foreground colors.

Implementation

void drawRect({
  required Rect rect,
  Color? background,
  Foreground? foreground,
});