events2 0.1.3 copy "events2: ^0.1.3" to clipboard
events2: ^0.1.3 copied to clipboard

outdated

Dart version of the event emitter.

dart-events #

Event emitter for dart2.

Usage #


import 'package:events2/events2.dart';

main() {
  EventEmitter event_emitter = new EventEmitter();

  event_emitter.on('event1', (arg0, String arg1, int arg2, arg3) {
    print('arg0 = ' + arg0 + ', arg1 = ' + arg1 + ', arg2 = ' + arg2.toString() + ', arg3 = ' + arg3.toString());
  });

  event_emitter.once('event2', () {
    print('event2 ');
  });
  
  event_emitter.emit('event1', 'a', 'b', null);
  event_emitter.emit('event2');
}

0
likes
20
pub points
73%
popularity

Publisher

unverified uploader

Dart version of the event emitter.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on events2