title: Lock the button in the flutter by double pressing
body: <p>I have a form that is filled out, and then it is sent to the database by the button (by post method). But there was a problem with the form data being sent for about 2 seconds. And the &quot;Submit Form&quot; button can be clicked several times during this time. Is it possible to somehow make so that after the first press of the button this button is blocked ??
  Code where the button in the widget is used:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>            Container(
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(15),
                ),
                padding: EdgeInsets.all(10.0),
                child: ButtonTheme(
                  minWidth: 10.0,
                  height: 40.0,
                  child: RaisedButton.icon(
                    label: Text(
                      "Submit Form",
                      style: TextStyle(color: Colors.white, fontSize: 15.0),
                    ),
                    icon: Icon(Icons.send_to_mobile),
                    onPressed: makeRequest ,
                    color: Colors.blue,
                    padding: EdgeInsets.all(20.0),
                  ),
                ),
                margin: EdgeInsets.only(top: 0.0),
              ),</code></pre>
  </div>
  </div>
  
  Form of sending data by post method:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  Future&lt;void&gt; makeRequest() async {
      HttpClient client = new HttpClient();
      client.badCertificateCallback =
      ((X509Certificate cert, String host, int port) =&gt; true);
  
      String url = global.urlVar + "/forms";
  
      Map map = {
        "seals": _mySeals,
        "data_area": global.dataArea,
        "object": global.nameObj,
        "type": global.typesOp,
        "user": global.nameUser,
  
      };
  
      HttpClientRequest request = await client.postUrl(Uri.parse(url));
  
      request.headers.set('content-type', 'application/json');
  
      request.add(utf8.encode(json.encode(map)));
  
      HttpClientResponse response = await request.close();
  
      if (200 == response.statusCode) {
        Navigator.push(
            context, MaterialPageRoute(builder: (context) =&gt; Status()));
      } else {
        Navigator.push(
          context,
          MaterialPageRoute(builder: (context) =&gt; Error_Auth()),
        );
      }
    }</code></pre>
  </div>
  </div>
  </p>