Created
December 2, 2022 12:23
-
-
Save gie3d/4f491bd9791d0cfecb9add0e3b26b757 to your computer and use it in GitHub Desktop.
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