Skip to content

Fix extent for null returning builder in GridView#132511

Merged
auto-submit[bot] merged 2 commits intoflutter:masterfrom
Piinks:easyGridFix
Aug 15, 2023
Merged

Fix extent for null returning builder in GridView#132511
auto-submit[bot] merged 2 commits intoflutter:masterfrom
Piinks:easyGridFix

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Aug 14, 2023

Fixes #130685

This fixes an issue where a GridView/SliverGrid with a SliverChildBuilderDelegate would still reflect a max scroll extent of infinity after returning null from the builder. This change incorporates the same way we handle this case in SliverList:

if (reachedEnd) {
estimatedMaxScrollOffset = endScrollOffset;
} else {

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.

Loading
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.

GridView/SliverGrid infinity scroll when [builder] returns null and itemCount is not used

3 participants