title: How to use CircularProgressIndicator in flutter
body: <p>Hi I have designed forgot password screen and integrated firebase on button click. I want to show the <code>CircularProgressIndicator</code> when user click on the button and dismiss it when firebase execution is finished.</p>
  
  <p>Does anyone know how to do this ? I want to have <code>CircularProgressIndicator</code> in the centre of the device.</p>
  
  <pre><code>class ForgotPasswordScreen extends StatelessWidget {
  
    final emailController = new TextEditingController();
    final authHandler = new Auth();
  
    @override
    Widget build(BuildContext context) {
      return new Scaffold(body: Container(
        height: MediaQuery.of(context).size.height,
        decoration: BoxDecoration(
          color: Colors.white,
        ),
        child: new Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisSize: MainAxisSize.max,
          mainAxisAlignment: MainAxisAlignment.center,
          children: &lt;Widget&gt;[
            new Row(
              children: &lt;Widget&gt;[
                new Expanded(
                  child: new Padding(
                    padding: const EdgeInsets.only(left: 40.0),
                    child: new Text(
                      "EMAIL",
                      style: TextStyle(
                        fontWeight: FontWeight.bold,
                        color: Colors.redAccent,
                        fontSize: 15.0,
                      ),
                    ),
                  ),
                ),
              ],
            ),
            new Container(
              width: MediaQuery.of(context).size.width,
              margin: const EdgeInsets.only(left: 40.0, right: 40.0, top: 10.0),
              alignment: Alignment.center,
              decoration: BoxDecoration(
                border: Border(
                  bottom: BorderSide(
                      color: Colors.redAccent,
                      width: 0.5,
                      style: BorderStyle.solid),
                ),
              ),
              padding: const EdgeInsets.only(left: 0.0, right: 10.0),
              child: new Row(
                crossAxisAlignment: CrossAxisAlignment.center,
                mainAxisAlignment: MainAxisAlignment.start,
                children: &lt;Widget&gt;[
                  new Expanded(
                    child: TextField(
                      controller: emailController,
                      textAlign: TextAlign.left,
                      decoration: InputDecoration(
                        border: InputBorder.none,
                        hintText: 'PLEASE ENTER YOUR EMAIL',
                        hintStyle: TextStyle(color: Colors.grey),
                      ),
                    ),
                  ),
                ],
              ),
            ),
            Divider(
              height: 24.0,
            ),
            new Container(
              width: MediaQuery.of(context).size.width,
              margin: const EdgeInsets.only(left: 30.0, right: 30.0, top: 20.0),
              alignment: Alignment.center,
              child: new Row(
                children: &lt;Widget&gt;[
                  new Expanded(
                    child: new FlatButton(
                      shape: new RoundedRectangleBorder(
                        borderRadius: new BorderRadius.circular(30.0),
                      ),
                      color: Colors.redAccent,
                      onPressed: () =&gt; authHandler.sendPasswordResetEmail(emailController.text).then((void nothing) {
                        print("done");
                      }).catchError((e) =&gt; print(e)),
                      child: new Container(
                        padding: const EdgeInsets.symmetric(
                          vertical: 20.0,
                          horizontal: 20.0,
                        ),
                        child: new Row(
                          mainAxisAlignment: MainAxisAlignment.center,
                          children: &lt;Widget&gt;[
                            new Expanded(
                              child: Text(
                                "FORGOT PASSWORD",
                                textAlign: TextAlign.center,
                                style: TextStyle(
                                    color: Colors.white,
                                    fontWeight: FontWeight.bold),
                              ),
                            ),
                          ],
                        ),
                      ),
                    ),
                  ),
                ],
              ),
            ),
          ],
        ),
      ));
    }
  
  }
  </code></pre>