Closed francescodinova closed 1 month ago
Okay, I just released version 4.3.1
which now includes this feature. You can read and update the aspect ratio as below.
/// Read AspectRatio
double ratio = editorKey.currentState!.cropRotateEditor.currentState!.activeAspectRatio;
/// Update AspectRatio
editorKey.currentState!.cropRotateEditor.currentState!.updateAspectRatio(2 / 3);
Thanks it's perfect!
Platforms
Android, iOS, Web, Windows, macOS
Description
I would like to read
aspectRatio
attribute inCropAreaHistory
mixin, and I would like a method to set it from code inCropRotateEditorState
, so that it is added to the history and the state is updated accordingly (just as theopenAspectRatioOptions()
method does).Why
In this way, it is possible to create a completely custom aspect ratio selector for the crop editor.