Flutter Progress Indicator Size [duplicate] Flutter Progress Indicator Size [duplicate] flutter flutter

Flutter Progress Indicator Size [duplicate]


Progress indicator will fill its parent layout widget e.g

SizedBox(    height: 300.0,    width: 300.0,    child:         CircularProgressIndicator(        valueColor: AlwaysStoppedAnimation(Colors.blue),        strokeWidth: 5.0)    )


  1. With this code you decide that it is an array of Widget,if you put that is an array,it's because of the response you can give,You can have more widget to add,
  2. That is centered
  3. and what is a CircularProgressIndicator.

In this way, the Circular Progress Indicatorwill not take the width and height of the father that contains it

regards

<Widget>[Center(child: CircularProgressIndicator())]


How can I combine a class that creates a loading indicator with mybutton, so that when I press it, the indicator turns on and flips tothe next page?

Here the code:

class Loader extends StatefulWidget {      @override      State createState() => LoaderState();    }    class LoaderState extends State<Loader> with SingleTickerProviderStateMixin {      AnimationController controller;      Animation<double> animation;      @override      void initState() {        super.initState();        controller = AnimationController(            duration: Duration(milliseconds: 1200), vsync: this);        animation = CurvedAnimation(parent: controller, curve: Curves.elasticOut);        animation.addListener(() {          this.setState(() {});        });        animation.addStatusListener((AnimationStatus status) {});        controller.repeat();      }      @override      void dispose() {        controller.dispose();        super.dispose();      }      @override      Widget build(BuildContext context) {        return Column(          mainAxisAlignment: MainAxisAlignment.center,          children: <Widget>[            Container(              color: Colors.blue,              height: 3.0,              width: animation.value * 100.0,            ),            Padding(              padding: EdgeInsets.only(bottom: 5.0),            ),            Container(              color: Colors.blue[300],              height: 3.0,              width: animation.value * 75.0,            ),            Padding(              padding: EdgeInsets.only(bottom: 5.0),            ),            Container(              color: Colors.blue,              height: 3.0,              width: animation.value * 50.0,            )          ],        );      }    }    Expanded(                        child: Padding(                          padding:                              EdgeInsets.only(left: 20.0, right: 5.0, top:20.0),                          child: GestureDetector(                            onTap: () {                              Navigator.push(                                  context,                                  MaterialPageRoute(                                      builder: (context) => FirstScreen()));                            },                            child: Container(                                alignment: Alignment.center,                                height: 45.0,                                decoration: BoxDecoration(                                    color: Color(0xFF1976D2),                                    borderRadius: BorderRadius.circular(9.0)),                                child: Text('Login',                                    style: TextStyle(                                        fontSize: 20.0, color: Colors.white))),                          ),                        ),                      ),