Skip to content

Instantly share code, notes, and snippets.

@bungabear
Last active December 26, 2023 05:24
Show Gist options
  • Save bungabear/9847caf193511382f3a348879e17b509 to your computer and use it in GitHub Desktop.
Save bungabear/9847caf193511382f3a348879e17b509 to your computer and use it in GitHub Desktop.
void main() {
asyncFunction1();
asyncFunction2();
print('main completed ${DateTime.now()}');
}
Future<void> asyncFunction1() async {
await Future.delayed(const Duration(milliseconds: 1000));
print('asyncFunction1 complete ${DateTime.now()}');
}
Future<void> asyncFunction2() async {
await Future.delayed(const Duration(milliseconds: 1000));
print('asyncFunction2 complete ${DateTime.now()}');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment