Created
June 10, 2019 23:08
-
-
Save legalcodes/e6ee207677e9f0e9220e73440e35eefc to your computer and use it in GitHub Desktop.
execution_flow_2
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
void createOrderMessage () async { | |
var order = await getUserOrder(); | |
print('Awaiting user order...'); | |
print('Your order is: $order'); | |
} | |
Future<String> getUserOrder() { | |
return Future.delayed(Duration(seconds: 4), () => 'Large Latte'); | |
} | |
main() async { | |
await createOrderMessage(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment