push method

void push(
  1. Object? key,
  2. V value
)

Forces an update, even in cases where the value at the key has not changed or is the same instance.

Implementation

void push(final Object? key, V value) {
  _context.conditionallyRunInAction(() {
    _reportUpdate(key as K?, value, _map[key]);
    final oldValue = _map[key];
    if (value != oldValue) {
      _map[key] = value;
    }
    _atom.reportChanged();
  }, _atom);
}