This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
Scroll 75% of x, y on each list scroll increment #824
Merged
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.
The gallery driver test includes logic to scroll through various lists of demos in order to transition to each one. These lists include the horizontally-scrolling studies list at the top of the gallery home page, as well as the vertically-scrolling Material, Cupertino, and Other demo lists on the same page.
TestDriver.scrollUntilVisible scrolls a parent list widget in increments of dx and/or dy until the specified list item widget is visible. The Studies carousel list at the top of the gallery home screen has scroll physics that snap items to the starting edge of the widget. If the dx scroll distance is too small, the Studies list doesn't scroll far enough and snaps back to its original position. Conversely, if it scrolls too far, it may scroll one widget too far and snap the next widget into place. Instead, we now scroll 75% of the carousel width (empirically determined) as an attempt at a value in the Goldilocks Zone.
Related: #792
Related: flutter/flutter#111131
Issue: flutter/flutter#114025
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.