CircleShape constructor
CircleShape constructor.
Implementation
CircleShape({
this.startAngle = 0,
this.endAngle = 2 * pi,
}) : super(
path: (size) {
var usedSize = size;
// if no offset is provided use the center of the widget.
var usedOffset = Offset(
(size.width - usedSize.width) / 2,
(size.height - usedSize.height) / 2,
);
var path = Path()
..addArc(
Rect.fromLTWH(
usedOffset.dx,
usedOffset.dy,
usedSize.width,
usedSize.height,
),
startAngle,
endAngle,
);
path.close();
return path;
},
);