Skip to content

Conversation

@Piinks
Copy link
Contributor

@Piinks Piinks commented Jun 6, 2019

Description

Updates the MediaQuery and MediaQueryData classes to include the viewPadding property & relevant functionality that was introduced in flutter/engine#8848.
This is part 1 of 2 on the way to fixing #29941, with implementation in the following classes to be added after this lands:

  • material/Scaffold
  • widgets/SafeArea
  • cupertino/CupertinoTabScaffold
  • cupertino/CupertinoPageScaffold

Related Issues

Addresses #29941

Tests

Updated Tests:

  • MediaQueryData.copyWith defaults to source
  • MediaQuery.copyWith copies specified values
  • MediaQuery.removePadding removes specified padding
  • MediaQuery.removeViewInsets removes specified viewInsets

Added:

  • MediaQuery.removeViewPadding removes specified viewPadding

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • No, this is not a breaking change.

@Piinks Piinks added the framework flutter/packages/flutter repository. See also f: labels. label Jun 6, 2019
@Piinks
Copy link
Contributor Author

Piinks commented Jun 6, 2019

/cc @dnfield

@dnfield dnfield requested a review from HansMuller June 6, 2019 20:02
@Piinks
Copy link
Contributor Author

Piinks commented Jun 6, 2019

Working on putting together a diagram in flutter/assets-for-api-docs.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

LGTM

@Piinks Piinks merged commit 991da4f into flutter:master Jun 10, 2019
@Piinks Piinks mentioned this pull request Jun 12, 2019
8 tasks
@Piinks Piinks self-assigned this Jun 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants