on method

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

Registers event listeners Define your success, error and skip handler

Implementation

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