StarShape constructor

StarShape({
  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,
})

StarShape constructor.

Implementation

StarShape({
  this.side = BorderSide.none,
  this.points = 5,
  this.innerRadiusRatio = 0.4,
  this.pointRounding = 0,
  this.valleyRounding = 0,
  this.rotation = 0,
  this.squash = 0,
}) : super(
        path: (size) {
          var usedSize = size;
          // if no offset is provided use the center of the widget.
          var usedOffset = Offset(
            10 + (size.width - usedSize.width) / 2,
            10 + (size.height - usedSize.height) / 2,
          );
          return StarBorder(
            side: side,
            points: points,
            innerRadiusRatio: innerRadiusRatio,
            pointRounding: pointRounding,
            valleyRounding: valleyRounding,
            rotation: rotation,
            squash: squash,
          ).getOuterPath(
            Rect.fromLTWH(
              usedOffset.dx,
              usedOffset.dy,
              usedSize.width,
              usedSize.height,
            ),
          );
        },
      );