removeAllListeners method

AsyncEventEmitter removeAllListeners(
  1. String? event
)

Removes all listeners, or those of the specified event. @param event The event for which to remove all listeners. @returns A reference to the AsyncEventEmitter, so that calls can be chained.

Implementation

AsyncEventEmitter removeAllListeners(String? event) {
  if (event == null) {
    // delete all listeners
    _listeners = {};
  } else {
    _listeners.remove(event);
  }
  return this;
}