Skip to content

Instantly share code, notes, and snippets.

@tunitowen
Created September 2, 2025 12:23
Show Gist options
  • Select an option

  • Save tunitowen/ac3c239e2816f57db955b525b6fded2f to your computer and use it in GitHub Desktop.

Select an option

Save tunitowen/ac3c239e2816f57db955b525b6fded2f to your computer and use it in GitHub Desktop.
Joii Streams Simple
void main() {
getStream()
.listen((v){
print(v);
});
}
Stream<String> getStream() async* {
final list = List.generate(10, (e) => e);
for (final item in list) {
await Future.delayed(Duration(seconds: 1));
yield "Hello World ($item)";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment