Created
June 4, 2022 18:49
-
-
Save sorgfal/0be9e069e1cce163331b712e5325aea3 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
| void main() { | |
| var z = asyncFunc(); | |
| print(z.toList()); | |
| } | |
| Stream<int> asyncFunc() async* { | |
| for(var i =0; i<10;i++){ | |
| print(i); | |
| if(i == 5){ | |
| return; | |
| } | |
| yield i; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment