LinearProgressIndicator & CircularProgressIndicator(每日Flutter 小部件)


LinearProgressIndicator &  CircularProgressIndicator  条形 圆形进度条

 

 

class ProgressIndicatorWidget extends StatefulWidget {
  ProgressIndicatorWidget({Key key}) : super(key: key);

  _ProgressIndicatorWidgetState createState() =>
      _ProgressIndicatorWidgetState();
}

class _ProgressIndicatorWidgetState extends State<ProgressIndicatorWidget> {
  _ProgressIndicatorWidgetState();

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Column(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        textDirection: TextDirection.ltr,
        verticalDirection: VerticalDirection.down,
        textBaseline: TextBaseline.alphabetic,
        children: [
          LinearProgressIndicator(
            value: 0.3,
            valueColor: new AlwaysStoppedAnimation<Color>(Colors.red),
            backgroundColor: Color(0xff00ff00),
          ),
          CircularProgressIndicator(

            backgroundColor: Color(0xff00ff00),
            valueColor: new AlwaysStoppedAnimation<Color>(Colors.red),

          )
        ]);
  }
}

  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM