I want to fetch from multiple Futures in one sitting. So I use Future.wait. But I can't get Future2 value if Future1 throws error.
Is there a solution to this with or without Future.wait ?
FutureBuilder(
future: Future.wait([Future1,Future2]),
builder: (context, snapshot) {
switch (snapshot.connectionState) {
case ConnectionState.none:
case ConnectionState.active:
case ConnectionState.waiting:
return SizedBox(height: 600, child: LoadingIndicator());
case ConnectionState.done:
// snapshot.data will come as null because there is an error
...