Created
July 23, 2018 21:32
-
-
Save RdeWilde/3a259aefbf21ce887632d220d4027d5d 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
ObservableList<Peer> sub = toObservable(server.peers) as ObservableList<Peer>; | |
sub.changes.listen((l) { | |
print('Changes'); | |
}); | |
sub.listChanges.listen((l) { | |
print('List'); | |
}); | |
server.peers.add(new Peer()); | |
new Timer.periodic(new Duration(seconds: 5), (t) { | |
server.peers.add(new Peer()); | |
print('Timer'); | |
}); // Print 'Timer' but not 'Changes' nor 'List' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment