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
94 stars 59 forks source link

Right overflow on small size phone #178

Closed HeropolisDa2ny closed 1 month ago

HeropolisDa2ny commented 1 month ago

I feel I'm not completely respecting your coding style so feel free to modify the code if you think it is needed.

On small size phone the condition constraints.maxWidth >= 300 wasn't true. An iconButton size is about 48px by default.

I've chosen here to split the code into methods and to get actions into variables to calculate the iconButtonsSizes and so to reduce the charge of maintainability (feel free to change it if you do not like - 7 icons * 48px -> 336px).

The painting app bar has now 3 states :

Depending on the available space.

In the PopupMenuOption was missing the changement of opacity.

I also might have failed my sync fork (sorry for that I don't have time rn to take a look at it)

HeropolisDa2ny commented 1 month ago

Great job! I like the new option you added, allowing the app bar to have three states for better responsiveness.

For your information, my current goal is to support the image editor at a minimum size of 280px. I believe your solution provides the best responsive experience for this requirement.

Thank you, I think undo and redo are quite used, so the best option was to have them in another state of app bar if the max couldn't fit.

Alright that's perfect! Maybe later instead of setting a fixed size of icon button it might be great to calculate it so that it would be automatically maintained if flutter changes its side but this is a really minor upgrade.

If everything is fine with the commit, could you please gen a new version on pub please ? Because it's breaking some of my tests due to the overflow error.

Thank you otherwise for your quick responses!

hm21 commented 1 month ago

Sorry my bad, I created a release commit and started generating the release version but forgot to confirm the release🙈 However, I have just released it now. It may take up-to 10 minutes before the new version is available.