undoAction method

void undoAction()

Undoes the last action performed in the painting editor.

Implementation

void undoAction() {
  if (canUndo) {
    setState(() {
      screenshotHistoryPosition--;
      if (screenshotHistoryPosition == 0) {
        reset(skipAddHistory: true);
      } else {
        _setParametersFromHistory();
      }
      cropRotateEditorCallbacks?.handleUndo();
    });
  }
}