Subscribable signals for Dart.
For example:
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.4.0
If your package is an
application package you should use any
as the
version constraint.
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:
import 'package:signals/ signals.dart';
| Version | Uploaded | Archive |
|---|---|---|
| 0.4.0 | Jan 22, 2013 | Download signals 0.4.0 archive |
| 0.3.0 | Jan 02, 2013 | Download signals 0.3.0 archive |
| 0.2.0 | Jan 02, 2013 | Download signals 0.2.0 archive |
| 0.1.0 | Dec 28, 2012 | Download signals 0.1.0 archive |