removeAllByEvent method

void removeAllByEvent(
  1. String event
)

Use this mechanism to remove all subscription for a particular event. Caution : This will remove all the listeners from multiple files or classes or modules. Think twice before calling this API and make sure you know what you are doing!!!

Implementation

void removeAllByEvent(String event) {
  this._listeners.removeWhere((key, val) => key == event);
}