-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Simplify SafeArea test for maintainBottomViewPadding to ensure maintainBottomViewPadding is always respected #97646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify SafeArea test for maintainBottomViewPadding to ensure maintainBottomViewPadding is always respected #97646
Conversation
Recent flutter engine changes enable iOS MediaQuery bottom viewInsets and padding to be !=0 simultaneously. This condition resulted in maintainBottomViewPadding being ignored. This commit forces use of viewPadding.bottom when maintainBottomViewPadding is true. Resolves issue flutter#97609.
I offer the following justification for the much-simplified condition concerning bottom padding: Assuming maintainBottomViewPadding is true and knowing that padding is calculated...
In all cases, it is valid to use viewPadding when maintainBottomViewPadding is true. This is also semantically aligned with the property name itself, which does not imply conditional behaviour based on viewInsets/padding. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @joellurcook, thanks for the contribution! Just a few nits below per the style guide. Thanks for fixing this!
I assume the failing checks are unrelated to the PR content - is there a simple way to prod the checks to be performed again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
…e maintainBottomViewPadding is always respected (flutter/flutter#97646)
Recent flutter engine changes enable iOS MediaQuery bottom viewInsets and padding to be !=0 simultaneously (see flutter/engine#29281).
This condition resulted in SafeArea maintainBottomViewPadding being ignored during keyboard animation.
This commit forces use of viewPadding.bottom when maintainBottomViewPadding is true.
This fixes the following issue:
fixes #97609.
No changes to existing tests.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.