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