off<P> method
Removes the callback
of eventName
event.
Implementation
void off<P>(Enum eventName, CallbackEvent<T, P> callback) {
_events[_instanceReceived]?[eventName]?.remove(callback);
if (_events[_instanceReceived]?[eventName]?.isEmpty ?? false) {
_events[_instanceReceived]?.remove(eventName);
}
if (_events[_instanceReceived]?.isEmpty ?? false) {
_events.remove(_instanceReceived);
}
}