Created
August 26, 2021 08:09
-
-
Save pihentagy/cfb1f8d4e0991245607a44a3ec9c17f5 to your computer and use it in GitHub Desktop.
yielding from deep
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 subsub() { | |
print("I need to yield here"); // how to yield here? | |
} | |
String sub() { | |
subsub(); | |
return "stuff"; | |
} | |
Stream<String> greeter() async* { | |
yield "hello"; | |
String c = sub(); | |
print(c); | |
yield "something"; | |
} | |
void main() async { | |
await for (String g in greeter()) { | |
print(g); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment