You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace MediaQuery.sizeOf with heightOf and widthOf. #168478
Recently, #167829 introduced MediaQuery.heightOf and MediaQuery.widthOf methods. After checking the Flutter repo, I noticed that 14 out of 28 calls to sizeOf use just one dimension.
Proposal
I'd like to propose the following:
Replace MediaQuery.sizeOf(context).height with MediaQuery.heightOf(context)
Replace MediaQuery.sizeOf(context).width with MediaQuery.widthOf(context)
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
Replace MediaQuery.sizeOf with heightOf and widthOf. (#168479)
github-actions commentedon May 21, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Replace MediaQuery.sizeOf with heightOf and widthOf. (#168479)