Skip to content

Instantly share code, notes, and snippets.

@haverchuck
Last active March 29, 2022 22:50
Show Gist options
  • Save haverchuck/e28e1c850dbf41ec895aed19e62daacb to your computer and use it in GitHub Desktop.
Save haverchuck/e28e1c850dbf41ec895aed19e62daacb to your computer and use it in GitHub Desktop.
Dart Future Processing Demonstration
import 'dart:async';
void main() async{
Future((){
Future.delayed(const Duration(milliseconds: 1000), () {
print('running Future1 with delay...');
});
}).then((_){
print('Future1 is complete');
});
Future((){
print('Running Future2');
}).then((_){
print('Future2 is complete');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment