[英]How to create two level circular progress indicator?
Following is what i want to achieve以下是我想要实现的
I was having a look at the Circular Percent Indicator library but that does not provide this functionality我正在查看 Circular Percent Indicator 库,但它不提供此功能
The following is achieve in native Android Development https://github.com/grmaciel/two-level-circular-progress-bar以下是在原生Android开发https://github.com/grmaciel/two-level-circular-progress-bar中实现的
but how to port it to Flutter?但是如何将它移植到 Flutter?
You can achieve this effect by using a stack
widget, it will allow you to place both indicators on an identical position which will get the effect of overlapping done :您可以通过使用stack
小部件来实现此效果,它将允许您将两个指标放置在相同的位置,从而获得重叠完成的效果:
Stack(
children: <Widget>[
CircularProgressIndicator(
value: 0.8,
valueColor: AlwaysStoppedAnimation<Color>(Colors.purple),
),
CircularProgressIndicator(
value: 0.6,
valueColor: AlwaysStoppedAnimation<Color>(Colors.green),
),
]
);
Try this, percent_indicator library,试试这个, percent_indicator库,
new CircularPercentIndicator(
radius: 130.0,
animation: true,
animationDuration: 1200,
lineWidth: 15.0,
percent: 0.4,
center: Center(
child: Icon(Icons.location_on),
),
circularStrokeCap: CircularStrokeCap.butt,
backgroundColor: Colors.deepPurple,
progressColor: Colors.green,
),
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.