Created
October 16, 2020 19:22
-
-
Save karabanovbs/663efba84d95652c00ad2caaae44dd06 to your computer and use it in GitHub Desktop.
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
import 'dart:async'; | |
void main() { | |
StreamController<int> controller = new StreamController<int>(); | |
var stream = controller.stream.asBroadcastStream(); | |
var sink = controller.sink; | |
sink.add(1); | |
stream.listen((v) => print(v)); | |
sink.add(2); | |
stream.listen((v) => print(v)); | |
} |
Author
karabanovbs
commented
Oct 17, 2020
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment