-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
In native Android, overscroll stretch reacts not only to direct dragging but also to fling momentum — creating a natural stretch even when the user flings quickly.
However, in Flutter, the StretchingOverscrollIndicator only reacts properly when dragging slowly. During a fling, the stretch effect is either absent or feels unnaturally clipped.
Since most users interact with scroll views using fast, momentum-based gestures, this makes the current implementation feel unnatural and disconnected from real-world UX.
But, part of the reason Flutter's overscroll effect feels quite different from Android 12's might be because it's not using the native Android shader, but the animation behavior itself also seems to be a major difference.
Therefore, I implemented it myself using SpringSimulation, and as a result, I was able to achieve an animation that closely matches the native Android behavior. (Admittedly, replacing the existing implementation and underlying mechanics is a challenging and potentially risky move in an open source project. Still, I believe it's not a bad idea to consider such a change.)
I think it's better to open an issue first before creating a PR, so I'm submitting one now.
Fling
3.mp4
Pull (Recovery?)
Also, a very similar animation is implemented when pulling as well.