Created
May 16, 2022 16:00
-
-
Save serpicokhan/a4aca9a40336078a4223b2aeccc0b8ce to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import 'dart:async'; | |
| Future doSomething() { | |
| return Future.delayed(Duration(seconds: 5)); | |
| } | |
| void main() async { | |
| //the function is fired and awaited till completion | |
| await doSomething(); | |
| // Explicitly-ignored | |
| //The function is fired and forgotten | |
| unawaited(doSomething()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment