StarBorder constructor Null safety

const StarBorder(
  1. {BorderSide side = BorderSide.none,
  2. double points = 5,
  3. double innerRadiusRatio = 0.4,
  4. double pointRounding = 0,
  5. double valleyRounding = 0,
  6. double rotation = 0,
  7. double squash = 0}
)

Create a const star-shaped border with the given number points on the star.

Implementation

const StarBorder({
  super.side,
  this.points = 5,
  double innerRadiusRatio = 0.4,
  this.pointRounding = 0,
  this.valleyRounding = 0,
  double rotation = 0,
  this.squash = 0,
})  : assert(squash >= 0),
      assert(squash <= 1),
      assert(pointRounding >= 0),
      assert(pointRounding <= 1),
      assert(valleyRounding >= 0),
      assert(valleyRounding <= 1),
      assert(
          (valleyRounding + pointRounding) <= 1,
          'The sum of valleyRounding ($valleyRounding) and '
          'pointRounding ($pointRounding) must not exceed one.'),
      assert(innerRadiusRatio >= 0),
      assert(innerRadiusRatio <= 1),
      assert(points >= 2),
      _rotationRadians = rotation * _kDegToRad,
      _innerRadiusRatio = innerRadiusRatio;