StarPainter constructor

const StarPainter({
  1. required int points,
  2. required double outerRadius,
  3. required double innerRadius,
  4. required Color color,
  5. double? strokeWidth,
  6. Color? strokeColor,
  7. double rotation = 0.0,
})

Creates a star painter.

points is the number of points of the star (minimum 3). outerRadius is the outer radius of the star in logical pixels. innerRadius is the inner radius of the star in logical pixels. color is the fill color of the star. strokeWidth is the width of the star's border. If null, no border is drawn. strokeColor is the color of the star's border. rotation is the rotation angle in radians. Defaults to 0.

Implementation

const StarPainter({
  required this.points,
  required this.outerRadius,
  required this.innerRadius,
  required this.color,
  this.strokeWidth,
  this.strokeColor,
  this.rotation = 0.0,
})  : assert(points >= 3, 'Star must have at least 3 points'),
      assert(outerRadius > innerRadius,
          'Outer radius must be greater than inner radius');