Subscribable signals for Dart.
var s = new Signal(); s.on((arg) => print('Emitted signal with arg: $arg')); s.emit(1) > Emitted signal with arg: 1
Add this to your package's pubspec.yaml file:
dependencies: signals: ">=0.6.0 <0.7.0"
If you're using the Dart Editor, choose:
Menu > Tools > Pub Install
Or if you want to install from the command line, run:
$ pub install
Now in your Dart code, you can use: