-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fine-tune iOS's scroll start feel #16721
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
Conversation
…sure that snap is accounted as well.
|
How does this code end up only affecting iOS? |
|
Only the iOS's scroll behaviour physics sets a |
|
One thing we might want to do is change our gesture recognizers to not do the jump, by having them start at zero offset when they "win". (Presumably we'd make that configurable, and the question here is just what the default configuration should be for those created by a GestureDetector.) cc @HansMuller who was interested in that particular idea. |
| return true; | ||
| // Already in motion or no threshold behavior configured. | ||
| // Allow transparent offset transmission. | ||
| return offset; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some comments in this method that talk about how by default, Android falls down one path and iOS the other, and point to the class that sets things up that way? Thanks.
|
I think it's sensible to make it tiered (partially gated here and partially gated in the gesture detector) and also add something similar to the gesture detector. In the long run, I still want to model iOS scrolls specifically to #13171 (it's just really hard to reverse engineer it) but that wouldn't apply to general gesture detectors so we still need 2 paths I think. But having it on gestures will solve a similar problem with things like back swipe which also 'jumps' in Flutter and doesn't natively. |
* Fine-tune iOS's scroll start feel * remove negations in doc * Our own dart-side gesture arena also contributes to the 'jerk'. Make sure that snap is accounted as well. * Added more code comments from review.
Fixes #16529
This makes sure on iOS that: