Question: I am using `FutureBuilder` like this -

`FutureBuilder(
 future: _future,
 builder: (BuildContext context, AsyncSnapshot snapshot) {
 return snapshot.connectionState != ConnectionState.done
 ? CircularProgressIndicator()
 : Text('Done');
 },
 ),`

In `initState`, I am calling `_future = getData();`

`getData` calls two async functions which are getting called only after the connection state is becoming done. What check should I put to make sure that progress indicator is shown until both the functions are executed?

Answer: 
Well assuming that the execution order of your async functions aren't important you can do something like:

```
initState(){
    _future = Future.wait( [yourAsyncFunc1(), yourAsyncFunc2()] );
 }

```

In this case `yourAsyncFunc1()` and `yourAsyncFunc2()` are the `async` functions that you call inside your `getData` function. `Future.wait(..., ...)` call returns immediately a future object but this future only completes after `yourAsyncFunc1` and `yourAsyncFunc2` execution are done. So you can use FutureBuilder widget with `_future` in `future` property and see the results.
Use async function with awaits. 

Something like

```
Future<void> getData() async {
  await future1Function();
  await future2Function();
}

```