off method

TTEvent<T, U, V> off(
  1. EventCb<T, U, V> cb
)

Unregister a listener on this event @param cb the callback to unsubscribe

Implementation

TTEvent<T, U, V> off(EventCb<T, U, V> cb) {
  _mutexAcquire(() {
    final idx = _listeners.indexOf(cb);
    if (idx != -1) {
      _listeners.removeAt(idx);
    }
  });
  return this;
}