flutter - 扑动中的响应式循环进展指标
问题描述
下面的代码手动更改圆形进度指示器的大小,方法是将其包裹在已调整大小的框周围并给出尺寸。我想让它响应,以便它可以适应每个屏幕尺寸。
SizedBox(
width: 50,
height: 50,
child: CircularProgressIndicator(
value: 0.5,
backgroundColor: Color(0xff19454A),
valueColor: AlwaysStoppedAnimation(Color(0xff0b6f75)),
strokeWidth: 8,
),
),
解决方案
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,
),
),
推荐阅读
- matplotlib - 如何断线 ax.legend
- javascript - 从 JavaScript 嵌入编辑 CSS 样式(删除 JotForm 页脚)
- javascript - 如何在reactjs中检查eles条件是否在警报中
- reactjs - 没有可滚动的内容时删除滚动条
- c# - 本地函数的代码被创建了多少次?只有一次或任何时候调用父函数?
- postgresql - Postgres 11 复制槽文件有错误的幻数
- reactjs - 构建脚本和预部署脚本失败。重新安装 npm 未解决问题
- java - Spring Boot Validation 可能有什么问题?
- javascript - 用于添加和删除类的 Jquery 函数以及用于多个 id 的 setTimeout 函数
- android - 旋转时如何获得相同大小的字体?