hnvn / flutter_image_cropper

A Flutter plugin for Android and iOS supports cropping images
969 stars 375 forks source link

Call to recoverImage() is over-triggering #463

Open orkun1675 opened 4 months ago

orkun1675 commented 4 months ago

Steps:

  1. Crop an image succesfully
  2. The cropped image is passed back to the app and used/saved
  3. Navigate back to the page that uses ImageCropper
  4. This page calls recoverImage() and gets a result every time (regardless of whether the previous operation succeeded)

Is this WAI? Can the app communicate to the ImageCropper package that it has successfully received the image?

I am using go_router 13.0.0 and image_cropper 5.0.1.

orkun1675 commented 4 months ago

A workaround I found was calling recoverImage() after obtaining the image succesfully but before leaving the page so that ImageCropper deletes the cache.

Maybe we can add an explicit method to delete the cached image for a cleaner API?