{{ message }}
Repository navigation
Conversation
… 2.1.4 With gaplessPlayback on, each image change kept the current ImageHandler as the previous one, and that handler's placeholder was its own previous handler's build. The chain was never cut, so every earlier handler and its ImageProvider stayed reachable while the widget was mounted. Keep a fresh handler built from the old widget instead, so it holds no earlier handler, and only replace it once the current image has shown a frame. Swapping faster than images load now keeps the last image that was actually shown. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)
Bug fix.
With
gaplessPlayback: true, every image change keeps the currentImageHandleras the previous one. That handler's placeholder is its own previous handler'sbuild, so the handlers form a chain that is never cut. Every earlier handler and itsImageProvider(including aMemoryImage's bytes) stays reachable for as long as theOctoImageis mounted. If images are swapped faster than they load, the placeholders also nest: after 5 swaps the tree holds 5 nestedImagewidgets.🆕 What is the new behavior (if this is a feature change)?
The kept previous handler is a fresh one built from the old widget, so it references no earlier handler. At most one previous image is held. It is replaced only once the current image has shown a frame, so swapping faster than images load keeps showing the last image that actually appeared. Version is bumped to 2.1.4.
💥 Does this PR introduce a breaking change?
No
🐛 Recommendations for testing
flutter test test/gapless_playback_test.dart. It shows a loaded image, then swaps to 5 images that never load, and expects only the newest image and the original one in the tree. It fails onmain.📝 Links to relevant issues/docs
didUpdateWidget, so whichever of the two merges second needs a small rebase.🤔 Checklist before submitting
🤖 Generated with Claude Code