once method
This function binds the handler
as a listener to the first
occurrence of the event
. When handler
is called once,
it is removed.
Implementation
void once(String event, EventHandler handler) {
this._eventsOnce.putIfAbsent(event, () => <EventHandler>[]);
this._eventsOnce[event]!.add(handler);
}