drawPolygon abstract method

void drawPolygon({
  1. required List<Point<num>> points,
  2. Rectangle<num>? clipBounds,
  3. Color? fill,
  4. Color? stroke,
  5. double? strokeWidthPx,
})

Renders a polygon shape described by a set of points.

points describes the vertices of the polygon. The last point will always be connected to the first point to close the shape.

fill configures the color inside the polygon. The shape will be transparent if this is not provided.

stroke and strokeWidthPx configure the color and thickness of the edges of the polygon. Both must be provided together for a line to appear.

Implementation

void drawPolygon({
  required List<Point> points,
  Rectangle<num>? clipBounds,
  Color? fill,
  Color? stroke,
  double? strokeWidthPx,
});