Skip to content

Instantly share code, notes, and snippets.

@pihentagy
Created August 26, 2021 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pihentagy/cfb1f8d4e0991245607a44a3ec9c17f5 to your computer and use it in GitHub Desktop.
Save pihentagy/cfb1f8d4e0991245607a44a3ec9c17f5 to your computer and use it in GitHub Desktop.
yielding from deep
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