记录自学flutter点点滴滴

Flutter 学习之旅(二十五) ProgressInd

2020-08-26  本文已影响0人  Tsm_2020

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

上一篇 下一篇

猜你喜欢

热点阅读