onSet property

  1. @override
LxOnSet? get onSet
override

Intercepts and optionally wraps a value mutation.

Implementation

@override
LxOnSet? get onSet => (next, reactive, change) {
      return (value) {
        next(value);
        if (_isRestoring) return;
        _redoStack.clear();
        if (_batchDepth == 0) _addChange(change);
      };
    };