title: I need to run two functions one after another in Flutter
body: <p>Basically I have a flutter project where I have to parse JSON data from REST API. First I had to perform Post Request in order to obtain &quot;UUID&quot;. Then used this parameter (UUID) created GET request to use UUID and get order information using REST API again. I created two buttons, one for POST request and another for GET request. Now what I want to do is perform these two operations (1st POST, 2nd GET) by just clicking one button. I am stuck with this problem. Maybe I should use the VoidCallBack function? or another method?</p>
  <pre><code>import 'dart:convert';
  
  import 'package:flutter/material.dart';
  import 'package:http/http.dart' as http;
  import 'ordertaxi_model.dart';
  
  class HomePage extends StatefulWidget {
    @override
    _HomePageState createState() =&gt; _HomePageState();
  }
  
  
  class _HomePageState extends State&lt;HomePage&gt; {
      Map uuid;
      String data;
    void orderTaxi() async {
      var data = {
        'api_key': 'this is my API key, sorry can not show',
        'phone': '1111',
        'street': 'Testttttt',
        'house': '11',
        'appartment': '11',
        'dst': 'Testtttttt',
        'moderation_required': 'yes',
      };
  
      var res = await http.post('rest api can not show', body: data);
      uuid = json.decode(res.body);
      if (res.statusCode != 200) throw Exception('http.post error: statusCode= ${res.statusCode}');
      print(uuid['response']['uuid']);
    }
  
      Future&lt;String&gt; orderInfo() async {
        var params = {
          'api_key': 'rest api can not show',
          'uuid': uuid['response']['uuid'],
        };
        var query = params.entries.map((p) =&gt; '${p.key}=${p.value}').join('&amp;');
  
        var res = await http.get('rest api can not show?$query');
        if (res.statusCode != 200) throw Exception('http.get error: statusCode= ${res.statusCode}');
        var info = json.decode(res.body);
        setState(() {
          String data = info['response']['message'];
          print(data);
        });
  
      }
      @override
      Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(title: Text('X-Fit Test'),),
        floatingActionButton: FloatingActionButton(
          child: Icon(Icons.add),
          onPressed:(){
            orderTaxi();
          },
        ),
        body:
  </code></pre>