Skip to content

Instantly share code, notes, and snippets.

@JesterXL
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JesterXL/f561662638f55b715c3c to your computer and use it in GitHub Desktop.
Save JesterXL/f561662638f55b715c3c to your computer and use it in GitHub Desktop.
Single Stream - doesn't work
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