Skip to content

Instantly share code, notes, and snippets.

View nsmirosh's full-sized avatar

Nikolay Miroshnychenko nsmirosh

View GitHub Profile
@nsmirosh
nsmirosh / future_asynchronous_callback.dart
Last active August 14, 2020 16:25
Dart's asynchronous Future callback demonstration
void main() {
print('print statement before invoking the future');
Future.delayed(Duration(seconds: 2), () {
print('Future completed!');
return 12;
});
print('print statement after invoking the future');
}