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

non optional wantKeepAlive feature [BUG] #478

Closed
Carlit0 opened this issue Oct 10, 2021 · 4 comments · Fixed by #479
Closed

non optional wantKeepAlive feature [BUG] #478

Carlit0 opened this issue Oct 10, 2021 · 4 comments · Fixed by #479
Labels
bug Something isn't working

Comments

@Carlit0
Copy link
Contributor

Carlit0 commented Oct 10, 2021

Describe the bug
The feature to keep the (scale) state of an image was introduced in #452 (release 0.13.0) with wantKeepAlive => true.
The feature is definitely useful but should be optional!
It causes unwanted behavior, for everyone who wants to mimic the iOS Photo app.

Which versions of Flutter/Photo View, and which browser / OS are affected by this issue? Did this work in previous versions of Photo View?
release 0.13.0

@Carlit0 Carlit0 added the bug Something isn't working label Oct 10, 2021
@ToniTornado
Copy link

I don't know what you describe as "unwanted behavior" but for us this unwanted behavior includes app crashes on the lowest level because it runs out of memory. The default behavior introduced in 0.13.0 keeps all PhotoViews alive until memory is full. Given a gallery that a user can swipe through, this limit is reached after ~40 images on the latest hardware. This should be fixed by this PR so +1 to finally merge it into a 0.14.0 👍🏻

@Carlit0
Copy link
Contributor Author

Carlit0 commented Nov 17, 2021

Interesting bug @ToniTornado !
To explain, when you swipe through photos in the iOS Photos app, the Photos app does not maintain the scaling state.
I think the Android Gallery app behaves the same way.

My fork would be a workaround for now:
photo_view: git: url: git://github.com/Carlit0/photo_view.git ref: master

@ToniTornado
Copy link

I first went with version 0.12.0 but now use your fork instead. The fix for flashing background color implemented in 0.13.0 was too noticeable so thanks for pointing me to it!

@Carlit0
Copy link
Contributor Author

Carlit0 commented Feb 18, 2022

FYI: as soon as a new version is published i will delete my fork @ToniTornado

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants