Skip to content

Instantly share code, notes, and snippets.

@enyo
Created November 15, 2018 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enyo/3fed1e72fb94be7bd771072b31d690b7 to your computer and use it in GitHub Desktop.
Save enyo/3fed1e72fb94be7bd771072b31d690b7 to your computer and use it in GitHub Desktop.
import 'dart:async';
Future foo() async {
print('foo() before delay');
await Future.delayed(Duration(milliseconds: 100));
print('foo() after delay');
}
void main() async {
print('main() before foo()');
await foo();
print('main() after foo()');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment