Repository navigation
refactor(superdeck): follow the active slide with a plain ListView - #127
Merged
leoafarias merged 2 commits intoSep 23, 2026
Merged
leoafarias merged 2 commits into
leoafarias merged 2 commits into
Conversation
Jumping forward or back to a far slide, stepping to the next one, and staying put when the slide is already in view, in both scroll directions.
scrollable_positioned_list has not been released since 2023, and the panel used its position listener to call setState on every scroll. Thumbnails share one extent, so the list's scroll extent is exact and a slide's offset follows from its index; animate to it with the same rules: stay put when fully visible, align to the nearer edge when cut off, and land ahead-of-view slides at 70% of the viewport.
|
Visit the preview URL for this PR (updated for commit d5b3a44): https://superdeck-dev--pr127-refactor-replace-sta-0l3s911u.web.app (expires Fri, 23 Oct 2026 03:39:53 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: bd68fc230762285849207e7e120aaf87cd4ca2f9 |
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.
Intent
Stack 3/8, based on #126. It drops
scrollable_positioned_listfrom superdeck without changing how the thumbnail panel follows the active slide.Why:
scrollable_positioned_listhasn't had a release since May 2023, and the panel used its position listener to callsetStateon every scroll change, rebuilding the panel while you scroll.Scroll-to-index is preserved. Every thumbnail has the same extent:
AspectRatio(kAspectRatio)plus a fixed margin and border, and selection only scales it. So the list's scroll extent is exact, and any slide's offset follows from its index, even when it's far away and not built yet. The movement rules are the same as before:Commits
test(superdeck): 8 tests, run first against the old implementation, where they pass. They cover jumping forward or back to a far slide, stepping to the next slide, and not scrolling when the slide is already visible, each in vertical and horizontal mode.refactor(superdeck):ListView.builderplus aScrollController. The dependency is removed and the change is noted in CHANGELOG.Not changed:
qr_flutterI planned to replace
qr_fluttertoo, since it was last released in 2023 and holdsqrat 3.x. I dropped that.pdf→barcode2.2.9 (its latest release) also requiresqr^3, soqr4 can't be used in this workspace either way, andqr_flutterhas no native code and causes no problems.Impacted packages
superdeck.Commands run
fvm dart analyze --fatal-infosin superdeck and demo: no issues.fvm flutter testin superdeck: 784 passing (the previous 776 plus the 8 new tests).fvm dart run melos run test:integration:macos --no-select: 39 passing (the demo app, including thumbnail navigation).