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