首页 > 解决方案 > 扑动中的响应式循环进展指标

问题描述

下面的代码手动更改圆形进度指示器的大小,方法是将其包裹在已调整大小的框周围并给出尺寸。我想让它响应,以便它可以适应每个屏幕尺寸。

SizedBox(
              width: 50,
              height: 50,
              child: CircularProgressIndicator(
                 value: 0.5,
                backgroundColor: Color(0xff19454A),
                valueColor: AlwaysStoppedAnimation(Color(0xff0b6f75)),
                strokeWidth: 8,

              ),
            ),

标签: flutterdartflutter-layoutflutter-animation

解决方案


SizedBox(
              width: MediaQuery.of(context).size.width*0.2,
              height: MediaQuery.of(context).size.width*0.2,
              child: CircularProgressIndicator(
                 value: 0.5,
                backgroundColor: Color(0xff19454A),
                valueColor: AlwaysStoppedAnimation(Color(0xff0b6f75)),
                strokeWidth: 8,

              ),
            ),

推荐阅读