undo method

void undo()

Undo to the previous value.

Implementation

void undo() {
  if (canUndo) {
    _isUndoRedoing = true;
    _index--;
    emit(_history[_index]);
    _isUndoRedoing = false;
  }
}