【问题标题】:Flutter: change CircularProgressIndicator color [duplicate]Flutter:更改 CircularProgressIndicator 颜色
【发布时间】:2019-06-23 20:15:59
【问题描述】:

我想更改CircularProgressIndicator 颜色但无法更改这里是代码 仍然显示蓝色。

CircularProgressIndicator(backgroundColor: Colors.grey[100],strokeWidth: 2.0,)

我已尝试使用theme,但它也无法正常工作。

child: Theme(
            data: Theme.of(context).copyWith(
            backgroundColor: Colors.grey[100]
            ),
        child: CircularProgressIndicator(strokeWidth: 2.0,),
      ),

【问题讨论】:

    标签: android dart flutter


    【解决方案1】:

    可能是这样的:https://stackoverflow.com/a/50075652/10956936

    CircularProgressIndicator(valueColor: new AlwaysStoppedAnimation<Color>(Colors.blue))
    

    【讨论】:

      猜你喜欢
      • 2021-09-10
      • 2018-10-01
      • 2021-05-26
      • 2021-08-07
      • 1970-01-01
      • 2021-08-22
      • 2018-10-24
      • 2021-06-09
      • 2020-02-19
      相关资源
      最近更新 更多