notify method

void notify()

Recomputes immediately and always schedules subscribers for update.

Unlike notifySoft, subscribers are marked pending even when equals reports no value change. When not inside a batch, queued effects flush before this call returns.

Implementation

void notify() {
  if (!isDisposed) {
    assert(() {
      JoltDevTools.notify(this);
      return true;
    }());
    update();

    var subs = this.subs;

    while (subs != null) {
      subs.sub.flags |= ReactiveFlags.pending;
      shallowPropagate(subs);
      subs = subs.nextSub;
    }

    if (this.subs != null && batchDepth == 0) {
      flushEffects();
    }
  }
}