removeAllByCallback method
Remove all listeners which matches with the callback provided. It is possible to register for multiple events with a single callback. This mechanism makesure that all event registrations would be cancelled which matches the callback.
Implementation
void removeAllByCallback(EventCallback callback) {
this._listeners.forEach((key, lst) {
lst.removeWhere((item) => item.callback == callback);
});
}