-
Notifications
You must be signed in to change notification settings - Fork 536
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
[BUG] PhotoViewCore
throws when changing pages while zoomed in
#217
Comments
This only happens when a |
Got it. I believe that |
Two things that make that impossible:
Anyway, throwing is never an option, this must be fixed. A drastic solution is to make the gallery receive the controllers, not pages. But with this approach, package user will not be able to eventually pass different controllers to different pages. |
Generally, a single controller for each feature is held by the state. From my point of view, to pass a different controller to different pages, the user must have lots of scale-state-controllers in the same state, which is unusual. Can you think on a practical usage of such feature? |
I can't picture a use case right now but having and application where there are a known amount of pages and the user has different (but exposed) states for each page doesnt sound like something impossible. |
If you create a
PhotoViewGallery
and pass aPhotoViewScaleStateController
in thePhotoViewGalleryPageOptions
defined at thebuilder
, the errorThe method 'toDouble' was called on null
is thrown byPhotoViewCore
when changing pages while zoomed in.You can reproduce this issue by running the code below, zooming in and changing to the second page without zooming out:
Not passing
scaleStateController
makes the issue disappear, so it's definitely related.Flutter details:
I believe this is related to the release 0.8.0.
The text was updated successfully, but these errors were encountered: