dispose<T> method

void dispose<T>(
  1. NUIBusEventListener<T> observer, {
  2. String? channel,
})

Implementation

void dispose<T>(NUIBusEventListener<T> observer, {String? channel}) {
  final targetChannel = channel ?? _GLOBAL_CHANNEL;
  final observers = _observers[targetChannel] ?? [];
  observers.remove(observer);
  _observers[targetChannel] = observers;
}