Polygon constructor
Polygon({})
Each polygon must have at least three points. Each hole must have at least three points.
Implementation
Polygon({
this.id,
required this.points,
this.holes = const [],
this.fillColor,
this.strokeColor,
this.alpha,
}) : assert(points.length >= 3, 'Polygon must have at least three points'),
assert(holes.every((hole) => hole.length >= 3),
'Hole must have at least three points');