Skip to content

Conversation

@olorin99
Copy link
Contributor

Swiping fullscreen image up or down greater than 1/3 of the view height exits the view. Otherwise the image will animate back to center of view.

Copy link
Member

@jwr1 jwr1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to work with zooming in/out (of the image) anymore? Is there a way to support both?

@olorin99
Copy link
Contributor Author

Ok flutters builtin InteractiveViewer kinda sucks. It internally uses a GestureDetectors onScaleStart, onScaleUpdate, onScaleEnd to handle all interaction types, which doesn't seem to work great for panning. I keep getting instances where I pan the image and the onInteractionEnd callback never triggers leaving the image floating weirdly off center of screen. I'll look for a third party library which handles panning better and redo this PR.

@olorin99 olorin99 marked this pull request as draft July 28, 2025 12:30
@olorin99
Copy link
Contributor Author

This should work now. Used https://pub.dev/packages/extended_image which also has some other nice to haves like simple editing which might use down the road.

@olorin99 olorin99 marked this pull request as ready for review July 30, 2025 10:58
Copy link
Member

@jwr1 jwr1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@jwr1 jwr1 merged commit 10c3a4d into main Jul 31, 2025
2 checks passed
@jwr1 jwr1 deleted the image_drag branch July 31, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants