Skip to content

How can I get the transformconfigs with my editorKey? I basically want to switch from croproateeditor to filtereditor and maintain the cropped image #185

Answered by hm21
ember11498 asked this question in Q&A
Discussion options

You must be logged in to vote

To retrieve the current transform configurations, you can use a GlobalKey to access the editor as shown below.

/// 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 t…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by ember11498
Comment options

You must be logged in to vote
4 replies
@hm21
Comment options

@ember11498
Comment options

@ember11498
Comment options

@hm21
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants