undo method

bool undo()

Will overwrite the current nodes with the last state according to _history

Returns true when the state has successfull been undone

Implementation

bool undo() {
  final willUndo = _history.isNotEmpty;
  if (willUndo) {
    historyIndex--;
    loadHistory();
  }
  return willUndo;
}