Skip to content

Fixing constraints.precedingScrollExtent passed to SliverPadding child#49433

Merged
fluttergithubbot merged 4 commits intoflutter:masterfrom
Piinks:precedePadding
Jan 31, 2020
Merged

Fixing constraints.precedingScrollExtent passed to SliverPadding child#49433
fluttergithubbot merged 4 commits intoflutter:masterfrom
Piinks:precedePadding

Conversation

@Piinks
Copy link
Copy Markdown
Contributor

@Piinks Piinks commented Jan 24, 2020

Description

The SliverConstraints passed by RenderSliverEdgeInsetsPadding to its child aren't updating precedingScrollExtent any beforePadding. This becomes apparent when the precedingScrollExtent is used by the child in its layout path, like in the example provided in #49195, and also SliverFillRemaining. This PR fixes that and adds a regression test.

Related Issues

Fixes #49195

Tests

I added the following tests:

SliverPadding updates precedingScrollExtent with beforePadding.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • No, no existing tests failed, so this is not a breaking change.

@Piinks Piinks added framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. labels Jan 24, 2020
Comment thread packages/flutter/test/widgets/slivers_padding_test.dart Outdated
@spkersten
Copy link
Copy Markdown
Contributor

Thanks for fixing this (and writing the tests)!

Copy link
Copy Markdown
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread packages/flutter/test/widgets/slivers_padding_test.dart Outdated
Comment thread packages/flutter/test/widgets/slivers_padding_test.dart
@fluttergithubbot
Copy link
Copy Markdown
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Cirrus CI has failed. Please fix the issues identified (or deflake) before re-applying this label.

@fluttergithubbot fluttergithubbot merged commit 8b60003 into flutter:master Jan 31, 2020
Piinks added a commit that referenced this pull request Feb 5, 2020
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 1, 2021
@Piinks Piinks deleted the precedePadding branch March 14, 2025 17:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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.

SliverPadding doesn't update precedingScrollExtent

5 participants