Skip to content

Conversation

ksokolovskyi
Copy link
Contributor

Closes #168478

Description

  • Replaces MediaQuery.sizeOf(context).height with MediaQuery.heightOf(context)
  • Replaces MediaQuery.sizeOf(context).width with MediaQuery.widthOf(context)

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. f: cupertino flutter/packages/flutter/cupertino repository labels May 7, 2025
@ksokolovskyi
Copy link
Contributor Author

@dkwingsmt dkwingsmt self-requested a review May 7, 2025 18:06
Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

LGTM 👍 . Good call fixing up these!

@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label May 7, 2025
@auto-submit auto-submit bot added this pull request to the merge queue May 7, 2025
Merged via the queue into flutter:master with commit bc74369 May 7, 2025
75 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 7, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 8, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request May 8, 2025
flutter/flutter@b0f5c8c...02d8c1a

2025-05-08 chris@bracken.jp iOS,macOS: Unify iOS,macOS build configs (flutter/flutter#168517)
2025-05-08 engine-flutter-autoroll@skia.org Roll Packages from b2ce3b0 to ab44c26 (3 revisions) (flutter/flutter#168548)
2025-05-08 zhongliu88889@gmail.com Remove unnecessary setAriaRole('dialog') fallback in SemanticRoute class (flutter/flutter#168345)
2025-05-08 engine-flutter-autoroll@skia.org Roll Skia from 4d617bb1bb7d to 43ae814d2d95 (1 revision) (flutter/flutter#168526)
2025-05-08 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from _GJje-N2Jk51qtBs6... to mqhX1OP8ezmialgqA... (flutter/flutter#168525)
2025-05-08 36861262+QuncCccccc@users.noreply.github.com Make MergeSemantics be able to merge customAction (flutter/flutter#168414)
2025-05-08 engine-flutter-autoroll@skia.org Roll Skia from d787c26f873a to 4d617bb1bb7d (1 revision) (flutter/flutter#168514)
2025-05-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#168509)
2025-05-07 fluttergithubbot@gmail.com Marks Mac_arm64_ios imitation_game_swiftui to be unflaky (flutter/flutter#163114)
2025-05-07 20605958+mohamedamara@users.noreply.github.com Add option to hide trailing icon in DropdownMenu (flutter/flutter#167782)
2025-05-07 engine-flutter-autoroll@skia.org Roll Skia from 1ea3ec8e7863 to d787c26f873a (6 revisions) (flutter/flutter#168505)
2025-05-07 kevmoo@users.noreply.github.com [web] drop more use of deprecated JS functions (flutter/flutter#166157)
2025-05-07 83038251+nailahsall0@users.noreply.github.com docs: Fixed broken links in WidgetStateProperty documentations (flutter/flutter#168191)
2025-05-07 engine-flutter-autoroll@skia.org Roll Skia from 14f3e3209b73 to 1ea3ec8e7863 (2 revisions) (flutter/flutter#168489)
2025-05-07 matanlurey@users.noreply.github.com Use `config: enable-swift-...: false`, remove `disable-swift-...: true`. (flutter/flutter#168433)
2025-05-07 sokolovskyi.konstantin@gmail.com Replace MediaQuery.sizeOf with heightOf and widthOf. (flutter/flutter#168479)
2025-05-07 robert.ancell@canonical.com Fix stencil buffer leak (flutter/flutter#168448)
2025-05-07 robert.ancell@canonical.com Fix framebuffer leak rendering to secondary views. (flutter/flutter#168447)
2025-05-07 robert.ancell@canonical.com Fix uninitalized fields in FlutterWindowMetricsEvent (flutter/flutter#168446)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
…r#9230)

flutter/flutter@b0f5c8c...02d8c1a

2025-05-08 chris@bracken.jp iOS,macOS: Unify iOS,macOS build configs (flutter/flutter#168517)
2025-05-08 engine-flutter-autoroll@skia.org Roll Packages from b2ce3b0 to ab44c26 (3 revisions) (flutter/flutter#168548)
2025-05-08 zhongliu88889@gmail.com Remove unnecessary setAriaRole('dialog') fallback in SemanticRoute class (flutter/flutter#168345)
2025-05-08 engine-flutter-autoroll@skia.org Roll Skia from 4d617bb1bb7d to 43ae814d2d95 (1 revision) (flutter/flutter#168526)
2025-05-08 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from _GJje-N2Jk51qtBs6... to mqhX1OP8ezmialgqA... (flutter/flutter#168525)
2025-05-08 36861262+QuncCccccc@users.noreply.github.com Make MergeSemantics be able to merge customAction (flutter/flutter#168414)
2025-05-08 engine-flutter-autoroll@skia.org Roll Skia from d787c26f873a to 4d617bb1bb7d (1 revision) (flutter/flutter#168514)
2025-05-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#168509)
2025-05-07 fluttergithubbot@gmail.com Marks Mac_arm64_ios imitation_game_swiftui to be unflaky (flutter/flutter#163114)
2025-05-07 20605958+mohamedamara@users.noreply.github.com Add option to hide trailing icon in DropdownMenu (flutter/flutter#167782)
2025-05-07 engine-flutter-autoroll@skia.org Roll Skia from 1ea3ec8e7863 to d787c26f873a (6 revisions) (flutter/flutter#168505)
2025-05-07 kevmoo@users.noreply.github.com [web] drop more use of deprecated JS functions (flutter/flutter#166157)
2025-05-07 83038251+nailahsall0@users.noreply.github.com docs: Fixed broken links in WidgetStateProperty documentations (flutter/flutter#168191)
2025-05-07 engine-flutter-autoroll@skia.org Roll Skia from 14f3e3209b73 to 1ea3ec8e7863 (2 revisions) (flutter/flutter#168489)
2025-05-07 matanlurey@users.noreply.github.com Use `config: enable-swift-...: false`, remove `disable-swift-...: true`. (flutter/flutter#168433)
2025-05-07 sokolovskyi.konstantin@gmail.com Replace MediaQuery.sizeOf with heightOf and widthOf. (flutter/flutter#168479)
2025-05-07 robert.ancell@canonical.com Fix stencil buffer leak (flutter/flutter#168448)
2025-05-07 robert.ancell@canonical.com Fix framebuffer leak rendering to secondary views. (flutter/flutter#168447)
2025-05-07 robert.ancell@canonical.com Fix uninitalized fields in FlutterWindowMetricsEvent (flutter/flutter#168446)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
…r#9230)

flutter/flutter@b0f5c8c...02d8c1a

2025-05-08 chris@bracken.jp iOS,macOS: Unify iOS,macOS build configs (flutter/flutter#168517)
2025-05-08 engine-flutter-autoroll@skia.org Roll Packages from b2ce3b0 to ab44c26 (3 revisions) (flutter/flutter#168548)
2025-05-08 zhongliu88889@gmail.com Remove unnecessary setAriaRole('dialog') fallback in SemanticRoute class (flutter/flutter#168345)
2025-05-08 engine-flutter-autoroll@skia.org Roll Skia from 4d617bb1bb7d to 43ae814d2d95 (1 revision) (flutter/flutter#168526)
2025-05-08 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from _GJje-N2Jk51qtBs6... to mqhX1OP8ezmialgqA... (flutter/flutter#168525)
2025-05-08 36861262+QuncCccccc@users.noreply.github.com Make MergeSemantics be able to merge customAction (flutter/flutter#168414)
2025-05-08 engine-flutter-autoroll@skia.org Roll Skia from d787c26f873a to 4d617bb1bb7d (1 revision) (flutter/flutter#168514)
2025-05-08 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#168509)
2025-05-07 fluttergithubbot@gmail.com Marks Mac_arm64_ios imitation_game_swiftui to be unflaky (flutter/flutter#163114)
2025-05-07 20605958+mohamedamara@users.noreply.github.com Add option to hide trailing icon in DropdownMenu (flutter/flutter#167782)
2025-05-07 engine-flutter-autoroll@skia.org Roll Skia from 1ea3ec8e7863 to d787c26f873a (6 revisions) (flutter/flutter#168505)
2025-05-07 kevmoo@users.noreply.github.com [web] drop more use of deprecated JS functions (flutter/flutter#166157)
2025-05-07 83038251+nailahsall0@users.noreply.github.com docs: Fixed broken links in WidgetStateProperty documentations (flutter/flutter#168191)
2025-05-07 engine-flutter-autoroll@skia.org Roll Skia from 14f3e3209b73 to 1ea3ec8e7863 (2 revisions) (flutter/flutter#168489)
2025-05-07 matanlurey@users.noreply.github.com Use `config: enable-swift-...: false`, remove `disable-swift-...: true`. (flutter/flutter#168433)
2025-05-07 sokolovskyi.konstantin@gmail.com Replace MediaQuery.sizeOf with heightOf and widthOf. (flutter/flutter#168479)
2025-05-07 robert.ancell@canonical.com Fix stencil buffer leak (flutter/flutter#168448)
2025-05-07 robert.ancell@canonical.com Fix framebuffer leak rendering to secondary views. (flutter/flutter#168447)
2025-05-07 robert.ancell@canonical.com Fix uninitalized fields in FlutterWindowMetricsEvent (flutter/flutter#168446)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC bmparr@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: text input Entering text in a text field or keyboard related problems f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace MediaQuery.sizeOf with heightOf and widthOf.
3 participants