How can I get the transformconfigs with my editorKey? I basically want to switch from croproateeditor to filtereditor and maintain the cropped image #185
-
So I know onDone: (transformations, fitToScreenFactor) {} this gives us the transformationconfigs but there is the problem that this pop the page, so my initial code doesnt work:
this is not pushing the filtereditor its just poping the page. So i am trying to create my own ReactiveCustomAppBar in order to create an icon which can push the filtereditor but now i dont know how to get the transformationconfigs |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
To retrieve the current transform configurations, you can use a /// Create a GlobalKey
final _cropRotateEditorKey = GlobalKey<CropRotateEditorState>();
/// Read the active transformConfigs
_cropRotateEditorKey.currentState!.transformConfigs ?? TransformConfigs.empty();
/// Add the GlobalKey to your editor
return CropRotateEditor.asset(
ExampleConstants.of(context)!.demoAssetPath,
key: _cropRotateEditorKey, Btw if this answers your question and your other question is resolved, I would appreciate it if you could click 'Mark as answer' on the post that you believe resolves it. This will help other users quickly find the solution when they encounter the same question. |
Beta Was this translation helpful? Give feedback.
-
@hm21 Am I doing something wrong when setting up the editorKey? because when i do editorKey.currentState!.transformConfigs and then i print its map i am getting {} which is basically an empty map. and i have cropped, fliped, rotated the image in the croprotateeditor before tapping on the button which gets the transformationConfigs and print
|
Beta Was this translation helpful? Give feedback.
To retrieve the current transform configurations, you can use a
GlobalKey
to access the editor as shown below.Btw if this answers your question and your other question is resolved, I would appreciate it if you could click 'Mark as answer' on the post that you believe resolves it. This will help other users quickly find the solution when t…