removeHandler method

  1. @override
void removeHandler(
  1. FSubscriberChannelCallback<TData, TEvent> cb
)
override

Implementation

@override
void removeHandler(FSubscriberChannelCallback<TData, TEvent> cb) {
  if (this.__callbacks == null) {
    return;
  }
  final int index = this.__callbacks!.indexOf(cb);
  if (index != -1) {
    this.__callbacks!.removeAt(index);
    if (this.__callbacks!.isEmpty) {
      this.onRemoveLastHandler();
    }
  }
}