StarBorder.polygon constructor Null safety

const StarBorder.polygon(
  1. {BorderSide side = BorderSide.none,
  2. double sides = 5,
  3. double pointRounding = 0,
  4. double rotation = 0,
  5. double squash = 0}
)

Create a const polygon border with the given number of sides.

Implementation

const StarBorder.polygon({
  super.side,
  double sides = 5,
  this.pointRounding = 0,
  double rotation = 0,
  this.squash = 0,
})  : assert(squash >= 0),
      assert(squash <= 1),
      assert(pointRounding >= 0),
      assert(pointRounding <= 1),
      assert(sides >= 2),
      points = sides,
      valleyRounding = 0,
      _rotationRadians = rotation * _kDegToRad,
      _innerRadiusRatio = null;