Created with <3 with dartpad.dev.
Created
December 2, 2022 12:24
-
-
Save gie3d/bb033db822078a8221441c2dbb1e01f6 to your computer and use it in GitHub Desktop.
bold-kingdom-9328
This file contains 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() { | |
x(); | |
} | |
void x() { | |
final stream = Stream.periodic(const Duration(seconds: 1), (i) => i * i) | |
.take(5); | |
final subscription = stream.listen((x) { | |
print(x); | |
}, onDone: () { | |
print("done"); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment