off<T, P> method

void off<T, P>(
  1. Object? instance,
  2. Enum eventName,
  3. CallbackEvent<T, P> callback
)
inherited

Removes the callback of eventName.

Implementation

void off<T, P>(
  Object? instance,
  Enum eventName,
  CallbackEvent<T, P> callback,
) {
  final notifier = _getEventNotifier(instance, eventName);

  if (notifier == null) return;

  notifier.removeListener(callback);
  _offEventNotifier(notifier);
}