Last active
August 29, 2015 14:04
-
-
Save JesterXL/f561662638f55b715c3c to your computer and use it in GitHub Desktop.
Single Stream - doesn't work
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
List myList = new List(); | |
Stream myStream = new Stream.fromIterable(myList); | |
StreamController controller = new StreamController(); | |
controller.stream.listen((_) | |
{ | |
print("stream listen, data: $_"); | |
}); | |
controller.addStream(myStream) | |
.then((_) | |
{ | |
print("ready"); | |
controller.add("sup"); | |
}) | |
.catchError((error) | |
{ | |
print("some error"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment