removeAllByEvent method

void removeAllByEvent(
  1. T 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!!! event - Event used during subscription.

Implementation

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