hsbijarniya / image_editor_plus

Flutter Image Editor Plugin with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories.
MIT License
103 stars 103 forks source link

Duplicate GlobalKey detected in widget tree. #75

Open rehman786waris opened 6 months ago

rehman786waris commented 6 months ago

The following assertion was thrown while finalizing the widget tree: Duplicate GlobalKey detected in widget tree.

The following GlobalKey was specified multiple times in the widget tree. This will lead to parts of the widget tree being truncated unexpectedly, because the second time a key is seen, the previous instance is moved to the new location. The key was:

ElevatedButton( child: const Text("Multiple image editor"), onPressed: () async { var editedImage = await Navigator.push( context, MaterialPageRoute(builder: (context) { return ImageEditor( images: [ imageData, imageData, ], ); }), ); if (editedImage != null) { image = editedImage; setState(() {}); } }, ),

miikhaaeel commented 4 months ago

Any fix for this?

knips-philip commented 3 weeks ago

I faced a similar issue, and bumping to latest version (1.0.6) seems to have solved it. For context, part of the changelog from 1.0.6

Removed global key use