Skip to content

Fine-tune fling velocity #11772

Closed
Closed

Description

@xster

There's a slight difference in velocity reported by iOS's pan gesture recognizer's velocityInView vs our own VelocityTracker. Flutter's calculation is ~20% faster.

On Android, the velocity tracker is distinct from the gesture callbacks, but our flings are a bit slower.

Probably better to have a platform agnostic velocity and correct the difference in the friction simulations.

Activity

  1. added this to the milestone on Aug 29, 2017
  2. Hixie commented on Aug 29, 2017

    @Hixie
    Contributor

    I've tentatively put this at post-1.0 but we can bring this back if people notice.

  3. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 29, 2017
  4. xster commented on Aug 29, 2017

    @xster
    MemberAuthor

    Agreed. I think it's lower prio than the last 4 we dealt with so far.

  5. eseidelGoogle commented on Apr 6, 2018

    @eseidelGoogle
    Contributor

    This came up in a review from an internal team today. I presume this shows up in:
    https://github.com/flutter/scroll_overlay

  6. eseidelGoogle commented on Aug 31, 2018

    @eseidelGoogle
    Contributor

    @xster do we know if this is still an issue? Has anyone played with scroll_overlay recently to tune our physics further?

  7. xster commented on Aug 31, 2018

    @xster
    MemberAuthor

    As of last time I checked in spring, it is still and issue. This and #13171 are the 2 remaining scrolling related issues I know of.

    I left them deprioritized and not slated for Q3-Q4 since I don't think they're noticeable enough. Let me know if that should change or if anyone is blocked on it.

  8. molon commented on Apr 10, 2019

    @molon

    It's still and issue.
    I feel ListView has too much friction when deceleration on iOS.
    But https://github.com/xster/flutter-test/tree/master/t95_ios_settings_page performs well.
    Is this my illusion?

    I went deep into the source code, and they all used the same ScrollPhysic.
    Really don't know why.

  9. eseidelGoogle commented on Apr 10, 2019

    @eseidelGoogle
    Contributor

    https://github.com/flutter/platform_tests contains a project one can use to test ListView against an iOS scroll physics if you'd like to confirm.

  10. molon commented on Apr 11, 2019

    @molon

    Very useful tests.

    Three problems can be clearly seen from the test:

    • Flutter scrolls faster
    • Flutter does not align with iOS when holding down the drag
    • They scroll stop at different times. Flutter stops earlier

    As a iOS developer.
    Based on my development experience, we hardly need a Cupertino UI.
    But something is important:

    • Standard dimension. eg: NavigationBar with 44.0. Although I can use AppBar+PreferredSize to implement it.
    • The scroll experience.
    • The transaction. Especially pan to swipe back. I have tried it in t95_ios_settings_page, It's also a little weird.

    Few users like a Cupertino UI. Because design should be diverse.
    But most users hard to tolerate app with inconsistent interactions.

    So I still prefer to use MaterialApp and I'm not going to use CupertinoApp.
    I guess there will be a lot of iOS developers like me.
    So I suggest that Flutter should pay more attention to interactions instead of CupertinoUI.

  11. xster commented on Apr 11, 2019

    @xster
    MemberAuthor

    Users building custom designs is indeed our vision though we've recently focused on building an extensive set of Cupertino widgets based on our quarterly survey results. Note also that the Material/Cupertino interest ratio is also skewed between China and the rest of the market.

    I do agree this is important however. We just haven't fine tuned it because no one noticed so far :) (as mentioned above). It shouldn't be difficult to do and it's in our plans for Q2. You can also send us a PR based on that comparison test.

  12. removed this from the milestone on Jan 7, 2020
  13. 1 remaining item

  14. added
    P3Issues that are less important to the Flutter project
    on May 29, 2020
  15. modified the milestone: on Jun 1, 2020
  16. removed this from the milestone on Jun 16, 2020
  17. LongCatIsLooong commented on Jun 26, 2020

    @LongCatIsLooong
    Contributor

    Looked into this (prompted by #59623). UIPanGestureRecognizer uses a far smaller sample size to calculate the velocity.

  18. removed this from the milestone on Jul 7, 2020
  19. modified the milestone: on Jul 22, 2020
  20. github-actions commented on Aug 17, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  21. locked as resolved and limited conversation to collaborators on Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P3Issues that are less important to the Flutter projectf: scrollingViewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specifically

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions