Skip to content

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 Piinks and ds84182 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