[英]Flutter - How to control the border width of the circular progress indicator?
不久前,我一直在使用CircularProgressIndicator
class 来显示带有SizedBox
class 的圆形进度指示器来控制子小部件的大小,就像这样:
...
SizedBox(
width: 20.0,
height: 20.0,
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation<Color>(
Colors.deepOrange,
),
),
)
...
但是我遇到它的宽度被夸大了,我可以减少那个指标的宽度吗?
任何建议或意见将不胜感激。 谢谢。
您可以使用CircularProgressIndicator
的strokeWidth
属性来定义它的宽度。
SizedBox(
width: 20.0,
height: 20.0,
child: CircularProgressIndicator(
strokeWidth: 2.0,
valueColor: AlwaysStoppedAnimation<Color>(
Colors.deepOrange,
),
),
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.