Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixes a NestedScrollView UserScrollNotification issue #107632

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

Merged
merged 2 commits into from
Jul 28, 2022

Conversation

xu-baolin
Copy link
Member

@xu-baolin xu-baolin commented Jul 14, 2022

Fixes #107101

We do not notify the idle state if ending the drag with a velocity.

We only notify the idle state if no scrolling occurs when the drag ends.

if (!scrolling) {
updateUserScrollDirection(ScrollDirection.idle);
}

@flutter-dashboard flutter-dashboard bot added f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. labels Jul 14, 2022
@xu-baolin xu-baolin requested a review from Piinks July 14, 2022 10:01
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

// Regression test for https://github.com/flutter/flutter/issues/107101
final List<ScrollDirection> receivedResult = <ScrollDirection>[];
const List<ScrollDirection> expectedReverseResult = <ScrollDirection>[ScrollDirection.reverse, ScrollDirection.idle];
const List<ScrollDirection> expectedFrowardResult = <ScrollDirection>[ScrollDirection.forward, ScrollDirection.idle];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo nit:

Suggested change
const List<ScrollDirection> expectedFrowardResult = <ScrollDirection>[ScrollDirection.forward, ScrollDirection.idle];
const List<ScrollDirection> expectedForwardResult = <ScrollDirection>[ScrollDirection.forward, ScrollDirection.idle];

@xu-baolin xu-baolin added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 20, 2022
@xu-baolin
Copy link
Member Author

@Piinks Hi, Could you help restart the G-test?

@goderbauer
Copy link
Member

@xu-baolin For some reason the "Google testing" check didn't trigger correctly. Could you rebase this PR with the latest master and push it up again? That will re-trigger the check. Sorry about this...

@auto-submit
Copy link
Contributor

auto-submit bot commented Jul 28, 2022

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 28, 2022
@auto-submit
Copy link
Contributor

auto-submit bot commented Jul 28, 2022

@xu-baolin
Copy link
Member Author

Test flakes issue -> #97316

@xu-baolin xu-baolin added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 28, 2022
@auto-submit auto-submit bot merged commit f976010 into flutter:master Jul 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 28, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 28, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NestedScrollView with UserScrollNotification direction value is not right
3 participants