Polygon constructor

Polygon(
  1. List<Point<num>> points
)

Implementation

Polygon(List<Point<num>> points) : points = points.toList(growable: false) {
  if (this.points.length < 3) {
    throw ArgumentError('Please provide three or more points.');
  }
}