toPath method
Returns a Path for this polygon.
startAngle places the start point of the polygon's first curve at that
angle, in radians, around the polygon's center, rotating the polygon
about that center to get it there. Zero is to the right of the center and
pi / 2 below it, since y grows downwards.
The default of zero is special: it skips the rotation entirely and leaves
the polygon as it was built.
If repeatPath is true, the curves are added twice before the Path is
closed. This is useful when the caller would like to draw parts of the
path while offsetting the start and stop positions, for example when
phasing and rotating a path to simulate motion as a star-shaped circular
progress indicator advances.
If closePath is false, the returned Path is left open.
Implementation
Path toPath({
double startAngle = 0.0,
bool repeatPath = false,
bool closePath = true,
Path? path,
}) => pathFromCubics(
cubics,
startAngle: startAngle,
repeatPath: repeatPath,
closePath: closePath,
rotationPivot: center,
path: path,
);