答案 0 :(得分:0)
我认为您可能希望为此使用CustomPaint和CustomPainter。
扩展CustomPainter
,并在其canvas.drawLine()
方法中使用canvas.drawArc()
和paint
。也许canvas.drawPoints()
也可以工作。
这两个链接包含有关如何使用这些组件的视频。
CustomPaint(
painter: MyCustomShapePainter(),
// other properties
),
class MyCustomShapePainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final paint = Paint()
..color = Colors.black
..strokeCap = StrokeCap.round;
canvas.drawLine(...);
}
@override
bool shouldRepaint(CustomPainter oldDelegate) {
return false;
}
}