Skip to content

[IOS] BouncingScrollPhysics too 'slippery' #103762

@LucasAschenbach

Description

@LucasAschenbach

Current Behavior

The current implementation of BouncingScrollPhysics feels somewhat 'slippery' when compared to the native iOS scroll physics. I tested the scroll behavior with the scroll_overlay app and made the following observations:

  • iOS only triggers a ScrollSimulation when it's velocity is > 83.0
  • iOS friction simulation uses more friction
  • iOS friction simulation is started at a slightly lower velocity
  • iOS velocity acceleration (carriedMomentum) for accumulated scrolling significantly stronger than in Flutter. I was able to scroll to the end of the native list while the Flutter list barely made it to ListTile no. 400.
  • Overscroll bounce simulation in iOS is exponential, not logistic as in the current implementation of BouncingScrollSimulation

Note: It seems that the iOS platform view exposes the scroll velocity in a larger unit

Quick Fix

  • Decrease FrictionSimulation drag to 0.126
  • Increase minFlingVelocity to 241.0

These changes will not mimic the iOS behavior perfectly but address the scroll fidelity to a degree that makes for an overall noticeably improved scrolling experience. Perhaps, also adding a configuration option for a fast and a normal deceleration rate as in the UIScrollView class from UIKit might be a way to go.

I'm not sure whether these changes should be added to the Framework provisionally or if you would like to wait for a more permanent solution to fix the issue. I mainly wanted to spark a conversation about the iOS scrolling physics in Flutter, as, while the differences are subtle, they are still noticeable in specific scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: fidelityMatching the OEM platforms betterc: proposalA detailed proposal for a change to Flutterf: scrollingViewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions