unlistenSignal<T> function

void unlistenSignal<T>(
  1. BuildContext context,
  2. ReadonlySignal<T> signal,
  3. void callback(), {
  4. String? debugLabel,
})

Remove all subscribers for a given signal for watchers

Implementation

void unlistenSignal<T>(
  BuildContext context,
  ReadonlySignal<T> signal,
  void Function() callback, {
  String? debugLabel,
}) {
  final key = context.hashCode;
  _elementRefs[key]?.unlisten(signal, callback);
}