popRedo method

_UndoRedoEntry? popRedo()

Pop the top redo frame; returns its forward patch so the caller can re-apply it.

Implementation

_UndoRedoEntry? popRedo() {
  _ensureLive();
  if (_redo.isEmpty) return null;
  final frame = _redo.removeLast();
  _undo.add(frame);
  _emit();
  return _UndoRedoEntry(
    patch: frame.forward,
    reverse: frame.inverse,
    originator: frame.originator,
  );
}