Reputation: 375
i'm getting values from API and it's in a Future<List<Object>>
form how do i convert into List<Objects>
?
i already tried using Future Builder but it recursively return NoDataDialog Widget.
Upvotes: 0
Views: 260
Reputation: 2654
There are two ways to deal with async functions
1st
_asyncFunction() async {
List list = await futureList;
}
2nd
_asyncFunction() {
Future.delayed(Duration(seconds: 10), () {
//this executes
}).then((_) {
//then this
});
}
Upvotes: 2