美文网首页记录自学flutter点点滴滴
Flutter 学习之旅(二十五) ProgressInd

Flutter 学习之旅(二十五) ProgressInd

作者: Tsm_2020 | 来源:发表于2020-08-26 11:16 被阅读0次

LinearProgressIndicator

LinearProgressIndicator(
            value: 0.2,///进度0-1
            backgroundColor: Colors.yellowAccent,/// 背景色
            minHeight: 5,/// 高度
            valueColor:AlwaysStoppedAnimation(Colors.redAccent), // 改变颜色,这里是动画,后面讲
            semanticsLabel: 'semanticsLabel',///辅助功能内从
            semanticsValue: 'semanticsValue',///辅助功能进度
          )

CircularProgressIndicator

  CircularProgressIndicator(///不给value 就转圈  ,给了就固定圆圈进度
//            value:0.5,
//            valueColor: AlwaysStoppedAnimation(Colors.redAccent),
//            backgroundColor: Colors.purpleAccent,
          )

例子

  @override
  Widget build(BuildContext context) =>Scaffold(
    appBar: AppBar(
      title: Text('ProgressIndicator'),
      centerTitle: true,
    ),

    body: Container(
      color: Colors.white,
      child: Column(
        children: [
          LinearProgressIndicator(
            value: 0.2,///进度0-1
            backgroundColor: Colors.yellowAccent,/// 背景色
            minHeight: 5,/// 高度
            valueColor:AlwaysStoppedAnimation(Colors.redAccent), // 改变颜色,这里是动画,后面讲
            semanticsLabel: 'semanticsLabel',///辅助功能内从
            semanticsValue: 'semanticsValue',///辅助功能进度
          ),
          CircularProgressIndicator(///不给value 就转圈  ,给了就固定圆圈进度
//            value:0.5,
//            valueColor: AlwaysStoppedAnimation(Colors.redAccent),
//            backgroundColor: Colors.purpleAccent,
          )
        ],
      ),
    ),
  );

我学习flutter的整个过程都记录在里面了
https://www.jianshu.com/c/36554cb4c804

最后附上demo 地址

https://github.com/tsm19911014/tsm_flutter

相关文章

网友评论

    本文标题:Flutter 学习之旅(二十五) ProgressInd

    本文链接:https://www.haomeiwen.com/subject/ogrxsktx.html