hm21 / pro_image_editor

The pro_image_editor is a Flutter widget designed for image editing within your application. It provides a flexible and convenient way to integrate image editing capabilities into your Flutter project.
https://hm21.github.io/pro_image_editor/
BSD 3-Clause "New" or "Revised" License
131 stars 71 forks source link

[Bug]: Delete drag target seems offset to the left on iPhone with cut out #75

Closed adamkoch closed 4 months ago

adamkoch commented 4 months ago

Package Version

3.0.7-dev.1

Flutter Version

3.22.2

Platforms

iOS

How to reproduce?

Spotted another bug :) The delete drop target in the top left corner seems to be offset to the left on an iPhone with cutout. The actual icon is correct, just the drop target is offset.

This may help explain it better, the red box is where it seems I need to drag to in order to trigger delete (where the delete area turns red).

Simulator Screenshot - iPhone 15 Pro - 2024-06-10 at 22 42 11

Logs (optional)

No response

Example code (optional)

No response

Device Model (optional)

No response

hm21 commented 4 months ago

Okay, that's interesting because it seems like something with the SafeArea is failing. In the discussion #68 I saw in your picture, it seems to be the same problem. Can you try two things now:

  1. Wrap the ProImageEditor widget inside a SafeArea.
  2. Make sure that nowhere in your code does it override the SystemUiOverlayStyle. The easiest way to test this is to clone the example and try it there.
  3. Move in the editor the SafeArea here above the ScreenResizeDetector here and try again.

If nothing resolves this issue, I need to know the exact device model. But to be honest, if nothing fixes this, it looks like this is a problem with the flutter framework.

adamkoch commented 4 months ago

Thanks for the pointers. Will have a play and see what I can find with SafeArea and ScreenResizeDetector.

FWIW, I tested with pro_image_editor sample and it also has the same behaviour with the delete target. The device is iPhone 15 Pro simulator in landscape mode.

Can you point me to the code which has the delete drag target? I can have a play and see if I can work out what's wrong.

adamkoch commented 4 months ago

I think I found it: https://github.com/hm21/pro_image_editor/pull/79