bagaimana menunggu sampai hasil async dikembalikan panah
void waitForIt async {
print('START');
if (await (fetchResults())) {
print('COMPLETE');
}
}
Future<bool> fetchResults() async {
return Future.delayed(const Duration(milliseconds: 3000), () {
return true;
});
}
MonkeySeeMonkeyDo