on method
This function binds the handler
as a listener to the event
@param String event - The event to add the handler to @param Function handler - The handler to bind to the event @return void
Implementation
void on(String event, Function handler) {
this._events.putIfAbsent(event, () => <Function>[]);
this._events[event]!.add(handler);
}