on method

void on(
  1. String event,
  2. Function handler
)

Implementation

void on(String event, Function handler) {
  EventCallback cb = (event, cont) {
    handler(event.eventData);
  };
  _eventEmitter.on(event, null, cb);
}