StarShape class

A shape that creates star patterns with a configurable number of points.

StarShape generates geometric paths for star shapes by alternating between outer points (full radius) and inner points (half radius) to create the classic star appearance. The star is inscribed in a circle that fits within the bounding rectangle.

Example usage:

// Create a 5-pointed star
StarShape(noOfPoints: 5)

// Create an 8-pointed star
StarShape(noOfPoints: 8)
Inheritance

Constructors

StarShape.new({required int noOfPoints})
Creates a new StarShape with the specified number of points.

Properties

hashCode int
The hash code for this object.
no setterinherited
noOfPoints int
The number of points (outer vertices) for the star.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build({Rect? rect, double? scale}) Path
Builds the geometric path for this shape.
override
generatePath({bool? useBezier, required Rect rect}) Path
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited