addHistory method
Adds the current transformation to the history.
Implementation
void addHistory({double? scaleRotation, double? angle}) {
if (!initialized) return;
cleanForwardChanges();
history.add(
TransformConfigs(
cropEditorScreenRatio: cropEditorScreenRatio,
angle: angle ?? rotateAnimation.value,
cropRect: cropRect,
originalSize: originalSize,
scaleUser: userScaleFactor,
scaleRotation: scaleRotation ?? scaleAnimation.value,
aspectRatio: aspectRatio,
flipX: flipX,
flipY: flipY,
offset: translate,
),
);
screenshotHistoryPosition++;
setState(() {});
takeScreenshot();
}