Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Prevent Mediaquery from losing navigationMode value when removePadding() is called #101938

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

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

egramond
Copy link
Contributor

Fixing an issue where MediaQuery loses the value of the navigationMode field when removePadding(), removeViewPadding() or removeViewInsets() are called.

Switching those methods to use the copy constructor to prevent similar issues in the future.

default constructor.

This fixes the navigationMode value that being dropped when these
methods were called, and should prevent similar issues from happening
with other new fields in the future.
@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Apr 14, 2022
@ds84182 ds84182 requested review from ds84182 and Piinks April 14, 2022 22:25
Copy link
Contributor

@ds84182 ds84182 left a comment

Choose a reason for hiding this comment

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

LGTM, we discussed this change and it'll prevent future issues when new fields are added to MediaQuery.

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for the contribution @egramond!

@fluttergithubbot fluttergithubbot merged commit fd360c4 into flutter:master Apr 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Apr 19, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants