drawRect abstract method

void drawRect(
  1. Rectangle<num> bounds, {
  2. Color? fill,
  3. Color? stroke,
  4. double? strokeWidthPx,
  5. Rectangle<num>? drawAreaBounds,
})

Renders a simple rectangle.

drawAreaBounds if specified and if the bounds of the rectangle exceed the draw area bounds on the top, the first x pixels (decided by the native platform) exceeding the draw area will apply a gradient to transparent with anything exceeding the x pixels to be transparent.

Implementation

void drawRect(Rectangle<num> bounds,
    {Color? fill,
    Color? stroke,
    double? strokeWidthPx,
    Rectangle<num>? drawAreaBounds});