Skip to content

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Jun 22, 2022

This applies the updates to PrimaryScrollController to SingleChildScrollView. It was left out in the original PR.


From original PR (#102099) for context:

This updates the PrimaryScrollController to not automatically attach to scroll views on desktop as it does on mobile platforms.
This behavior has caused a lot of issues for users developing desktop applications that have multiple parallel vertical ScrollViews.
This adds two parameters to PrimaryScrollController

  • automaticallyInheritForPlatforms
    • specifies a set of TargetPlatforms that will engage automatic inheritance
  • scrollDirection
    • This adds the ability to specify which axis the PrimaryScrollController should be inherited for.

Also adds static method shouldInherit, which uses the two properties above to determine if automatically inheriting the ScrollController is appropriate for the current configuration.

This design and other approaches is discussed at length in this design document.

Fixes #100264
Related (among others):

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

](https://github.com/Piinks/flutter/pull/new/fixSingleChild)

@Piinks Piinks added framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. labels Jun 22, 2022
@Piinks Piinks requested review from TahaTesser and xu-baolin June 22, 2022 17:14
Copy link
Member

@xu-baolin xu-baolin left a comment

Choose a reason for hiding this comment

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

LGTM

@xu-baolin xu-baolin added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 23, 2022
@auto-submit auto-submit bot merged commit 9f4b9bf into flutter:master Jun 23, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jun 24, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 24, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 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.

Remove Primary Scroll Controller for Flutter Desktop apps

2 participants