undo method
Restores the previous scene state.
Implementation
bool undo() {
if (_undoStack.isEmpty) return false;
_pushRedo(toJson());
_loadJson(_undoStack.removeLast());
render();
onUndo?.call(this);
return true;
}
Restores the previous scene state.
bool undo() {
if (_undoStack.isEmpty) return false;
_pushRedo(toJson());
_loadJson(_undoStack.removeLast());
render();
onUndo?.call(this);
return true;
}