unlistenSignal method

void unlistenSignal(
  1. ReadonlySignal target,
  2. void callback()
)

Stop listening to a signal value

Implementation

void unlistenSignal(
  ReadonlySignal<dynamic> target,
  void Function() callback,
) {
  final current = _signals[target.globalId];
  if (current != null) {
    current.listener?.cleanup();
    _signals[target.globalId] = (
      local: current.local,
      target: target,
      listener: null,
    );
  }
}