This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<void> printOrderMessage() async { | |
print('Awaiting user order...'); | |
var order = await fetchUserOrder(); | |
print('Your order is: $order'); | |
} | |
Future<String> fetchUserOrder() { | |
return Future.delayed(Duration(seconds: 3), () => 'Large Latte'); | |
} |