StarShape constructor

StarShape({
  1. required int noOfPoints,
})

Creates a new StarShape with the specified number of points.

The noOfPoints parameter must be greater than 3 to create a recognizable star shape.

Throws an AssertionError if noOfPoints is 3 or less.

Implementation

StarShape({required this.noOfPoints}) : assert(noOfPoints > 3);