undo method
Reverts the most recent state change.
Implementation
bool undo() {
if (_undoStack.isEmpty) return false;
final change = _undoStack.removeLast();
_redoStack.add(change);
_applyRestore(change, isUndo: true);
LevitReactiveMiddleware.runWithoutMiddleware(() => _version.value++);
return true;
}