one<P> method

void one<P>(
  1. Enum eventName,
  2. CallbackEvent<T, P> callback
)

Puts on to listen eventName event only once.

When the event is emitted, the callback is called and after removes eventName event.

Implementation

void one<P>(Enum eventName, CallbackEvent<T, P> callback) {
  Reactter.one<T, P>(_instanceReceived, eventName, callback);
}