Skip to content

Let translucent Cupertino bars have its scaffold children automatically pad their heights - second try#13440

Merged
xster merged 3 commits intoflutter:masterfrom
xster:simple-sliver-padding-2
Dec 8, 2017
Merged

Let translucent Cupertino bars have its scaffold children automatically pad their heights - second try#13440
xster merged 3 commits intoflutter:masterfrom
xster:simple-sliver-padding-2

Conversation

@xster
Copy link
Member

@xster xster commented Dec 8, 2017

Fixes #12913

Basically a revert of #13317 that also integrates comments from #13310

Remove manual padding to account for obstructed area
Obstructed areas are signaled to scaffold children via MediaQuery
List/GridViews automatically consume and sliver pad MediaQuery in main axis direction

Causes of the original revert should be now solved by #13337 and #13438

xster and others added 3 commits December 7, 2017 17:46
…ly pad their heights (flutter#13194)

* Let lists automatically add sliver padding from media query. Translucent nav and tab bars leave behind media query paddings in scaffolds.

* tests

* const lint

* Rename base abstract class to generalized ObstructingPreferredSizeWidget
@xster xster mentioned this pull request Dec 8, 2017
@xster xster requested a review from tvolkert December 8, 2017 02:11
Copy link
Contributor

@tvolkert tvolkert left a comment

Choose a reason for hiding this comment

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

Thanks!

@xster xster merged commit ecf5041 into flutter:master Dec 8, 2017
@xster xster deleted the simple-sliver-padding-2 branch December 8, 2017 17:00
childCount: 50,
new SliverPadding(
// Top media query padding already consumed by CupertinoSliverNavigationBar.
padding: MediaQuery.of(context).removePadding(removeTop: true).padding,
Copy link
Contributor

Choose a reason for hiding this comment

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

this doesn't seem right... we're consuming the padding, but we're not actually updating the MediaQuery for the children.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh, i see, this is the demo file, not a widget. probably ok then.

DaveShuckerow pushed a commit to DaveShuckerow/flutter that referenced this pull request May 14, 2018
…ly pad their heights - second try (flutter#13440)

* Let translucent Cupertino bars have its scaffold children automatically pad their heights (flutter#13194)

* Let lists automatically add sliver padding from media query. Translucent nav and tab bars leave behind media query paddings in scaffolds.

* tests

* const lint

* Rename base abstract class to generalized ObstructingPreferredSizeWidget

* review

* More docs and comments from flutter#13317
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically pad scrollables with sliver paddings based on translucent items not directly in ancestor tree

4 participants