Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only 1 image is shown in MultiImageProvider and cannot navigate to the next image #11

Closed
keanallen opened this issue Mar 23, 2022 · 6 comments
Assignees

Comments

@keanallen
Copy link

Describe the Issue

This does not work in Desktop (Windows) at Flutter version 2.10.3 channel stable

Todo

Expected behavior

I should be able to see all the images declared in MultiImageProvider

Todo

Steps to Reproduce

Just try it on Desktop

n/a

Other Information

n/a

@jfahrenkrug
Copy link
Collaborator

@keanallen Thank you for reporting this. I haven't been able to try it on Windows, but I think these links are relevant to the issue:
https://stackoverflow.com/questions/69424933/flutter-pageview-not-swipeable-on-web-desktop-mode
https://docs.flutter.dev/release/breaking-changes/default-scroll-behavior-drag
https://www.reddit.com/r/flutterhelp/comments/thyl47/how_to_use_arrow_keys_or_mouse_swipe_for_pageview/

Basically the default behavior is that a mouse can't scroll a PageView. I'll look into this soon, and I'll appreciate your help testing it on Windows once I have a fix. Thanks!

@jfahrenkrug jfahrenkrug self-assigned this Mar 23, 2022
@keanallen
Copy link
Author

@keanallen Thank you for reporting this. I haven't been able to try it on Windows, but I think these links are relevant to the issue: https://stackoverflow.com/questions/69424933/flutter-pageview-not-swipeable-on-web-desktop-mode https://docs.flutter.dev/release/breaking-changes/default-scroll-behavior-drag https://www.reddit.com/r/flutterhelp/comments/thyl47/how_to_use_arrow_keys_or_mouse_swipe_for_pageview/

Basically the default behavior is that a mouse can't scroll a PageView. I'll look into this soon, and I'll appreciate your help testing it on Windows once I have a fix. Thanks!

Sure. Im using this in our desktop chat application. Waiting for the fix <3
image

@jfahrenkrug
Copy link
Collaborator

@keanallen In your use case, what behavior would you expect? It sounds like "< Prev" and "Next >" buttons would be the most intuitive? Or would you expect the user to click and drag the image to advance to the next image?

jfahrenkrug added a commit that referenced this issue Apr 15, 2022
By default page views (and scroll views in general) can only be
dragged with touch devices, not mice.
That means it was impossible to advance to the next image on desktop
(Windows).
This commit enables dragging with a mouse. Since the images are
displayed full-screen, it shouldn't interfere with anything else.

For more references, see:
https://stackoverflow.com/questions/69424933/flutter-pageview-not-swipeable-on-web-desktop-mode
https://docs.flutter.dev/release/breaking-changes/default-scroll-behavior-drag
https://www.reddit.com/r/flutterhelp/comments/thyl47/how_to_use_arrow_keys_or_mouse_swipe_for_pageview/
@jfahrenkrug
Copy link
Collaborator

@keanallen PR to enable dragging. Feel free to give it a try on Windows: #13

jfahrenkrug added a commit that referenced this issue Apr 19, 2022
Enable dragging the PageView with a mouse (GH-11)
@jfahrenkrug
Copy link
Collaborator

I'm closing this, feel free to reopen if needed.

@henry2man
Copy link

henry2man commented Jul 27, 2022

@jfahrenkrug Hi there. I'm also using the package on Web/MacOS but I cannot change pages using mouse and/or using "drag" gestures with the mouse.

Also if I try to scroll horizontally (with an MX Master 3) I cannot change page, even if I try as fast as I can:

demo-bug.mp4

Probably this should be reopened. And having some <PREV & NEXT> buttons could be great, even for mobile (when a gallery is loaded, there isn't any visual indicative about other images).

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

No branches or pull requests

3 participants