Repository navigation
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
|
I signed it! |
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
|
CLAs look good, thanks! |
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
|
CLAs look good, thanks! |
|
Any update on this? |
|
Looking now. Sorry about the delay. |
|
Generally speaking:
This PR looks like it will fix #17555 If |
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
|
CLAs look good, thanks! |
|
@HansMuller I edited Issue and added tests |
HansMuller
left a comment
There was a problem hiding this comment.
The issue's description is much improved, thanks!
The issue's description still needs to explain how the scaffold's body response when the keyboard appears and extendedBody is true.
|
@HansMuller I edited the issue and refactored the tests. |
|
Any update on this? |
| "time": 3.488, | ||
| "issues": 0, | ||
| "missingDartDocs": 0 | ||
| } |
There was a problem hiding this comment.
you probably didn't mean to include this file?
| /// If true and a [bottomNavigationBar] is specified then the body | ||
| /// extends to the bottom of the Scaffold, instead of only extending | ||
| /// to the top of the [bottomNavigationBar]. | ||
| final bool extendedBody; |
There was a problem hiding this comment.
this should probably be called "extendBody" rather than "extendedBody".
"extend body" says whether we should extend the body or not.
"extended body" says whether the body is extended or not.
In this case, the body can be either, it doesn't have an intrinsic property of being extended. We decide whether to extend it or not. Hence "extend body".
|
So I was thinking of using this in my own app, but there's a huge problem with it, as far as I can tell: you have to add padding to the bottom of your list (or whatever is in your body), but there's really no way to know how much padding to add. |
|
What we really need to do is find a way to put the padding that we add at the bottom into the MediaQuery for the In my app I worked around this like this: body: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
const double bottomPadding = 50.0;
final double height = constraints.maxHeight + bottomPadding;
final MediaQueryData metrics = MediaQuery.of(context);
return OverflowBox(
minWidth: constraints.maxWidth,
maxWidth: constraints.maxWidth,
minHeight: height,
maxHeight: height,
alignment: Alignment.topCenter,
child: MediaQuery(
data: metrics.copyWith(padding: metrics.padding.copyWith(bottom: bottomPadding)),
child: TabBarView(
children: pages,
),
),
);
},
), |
|
@Hixie thanks, I understood. I'll try to do |
|
Is this going to be merged to Flutter soon? Personally I think it gives meaning to notched fab and bnb |
|
@aytunch sorry, I do not have much time to work on PR. I will try to continue next week. |
|
@IKatsuba I'm working on a version of this PR that generates the appropriate MediaQuery to per #25654 (comment). It's a bit tricky. I hope to have something up for review today. |
|
@HansMuller sorry guys. Trying to find time in the next couple of days. |
What's changed
Added parameter Scaffold.extendedBody.
If
Scaffold.extendedBody=trueand aScaffold.bottomNavigationBaris specified then the body extends to the bottom of the Scaffold, instead of only extending to the top ofScaffold.bottomNavigationBar.If the keyboard is closed or the keyboard is open and
Scaffold.resizeToAvoidBottomInset=falsethen theScaffold.resizeToAvoidBottomInsetparameter does not affectScaffold.extendedBody.If the keyboard is open and
Scaffold.resizeToAvoidBottomInset=truethen the body extends to the bottom of the keyboard.Before
After
Existing issues that the PR fixes