title: how to disable button after first click in flutter?
body: <p>Clicked Button multiple times same time, open pages multiple times. How to fix this issue? I also uploaded the gif file on my application(double click on the image).</p>
  
  <pre><code>     Container(
                              padding: EdgeInsets.all(10.0),
                              child: ButtonTheme(
                                minWidth: 10.0,
                                height: 40.0,
                                child: RaisedButton(
                                  child: Text(
                                    AppTranslations.of(context)
                                        .text("loginpage_button"),
                                    style: TextStyle(
                                        color: Colors.white, fontSize: 15.0),
                                  ),
                                  onPressed: () async{
                                    (isOffline)
                                      ? _showSnackBar()
                                        : checking2(usernameController, context, _url);
                                  },
                                  color: Colors.blue,
                                  padding: EdgeInsets.all(20.0),
                                ),
                              ),
  margin: EdgeInsets.only(top: 0.0),
  </code></pre>
  
  <p>)</p>
  
  <p><strong>I used this code, it's working, but user types username incorrectly, user cant click button second type. this is my code.</strong></p>
  
  <pre><code>onPressed: () async {
   if (_firstClick) {
  _firstClick = false;
  (isOffline)
  ? _showSnackBar()
  : checking2(usernameController, context, _url);
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/EIFhm.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/EIFhm.gif" alt="enter image description here"></a></p>