event emitter for Dart

Build Status License Dart

A Dart event emitter implementation without any dependencies.

Requirement

  • dart>=1.20.0

Usage

import 'package:event_emitter/event-emitter.dart' show EventEmitter;

void main() {
  EventEmitter event = new EventEmitter();
  event.on('say hi', (name) {
    print('Hi! $name');   // Hi! Axetroy
  });
  event.emit('say hi', 'Axetroy');
}

Test

./scripts/test

Contribute

git clone https://github.com/axetroy/event-emitter.dart.git
cd ./event-emitter.dart
pub get
./scripts/test

You can flow Contribute Guide

License

The MIT License

Libraries

event-emitter