paintArc static method
void
paintArc(})
绘制圆弧
center
圆心坐标
radius
半径
startAngle
开始角度
sweepAngle
间隔角度
color
画笔颜色
strokeWidth
画笔宽度
Implementation
static void paintArc(
Canvas canvas,
Offset center,
double radius, {
double startAngle = 0.0,
double sweepAngle = 360.0,
Color color = Colors.blue,
double strokeWidth = 1,
}) {
Rect rect = Rect.fromCircle(center: center, radius: radius);
canvas.drawArc(
rect,
startAngle * rad,
sweepAngle * rad,
false,
Paint()
..color = color
..strokeCap = StrokeCap.round
..strokeWidth = strokeWidth
..style = PaintingStyle.stroke,
);
}