PolygonPainter constructor
const
PolygonPainter({})
Creates a polygon painter.
sides is the number of sides of the polygon (minimum 3).
radius is the radius of the polygon in logical pixels.
color is the fill color of the polygon.
strokeWidth is the width of the polygon's border. If null, no border is drawn.
strokeColor is the color of the polygon's border.
rotation is the rotation angle in radians. Defaults to 0.
Implementation
const PolygonPainter({
required this.sides,
required this.radius,
required this.color,
this.strokeWidth,
this.strokeColor,
this.rotation = 0.0,
}) : assert(sides >= 3, 'Polygon must have at least 3 sides');