listen method

void listen(
  1. ReadonlySignal value,
  2. VoidCallback cb
)

Attach a callback to the widget

Implementation

void listen(core.ReadonlySignal value, VoidCallback cb) {
  _listen.putIfAbsent(
    value.globalId,
    () => value.subscribe((val) => _callback(cb, listener: true)),
  );
}