Skip to content

Add useInheritedMediaQuery removal breaking change entry and migration guide - #13916

Merged
sfshaza2 merged 5 commits into
flutter:mainfrom
AbdeMohlbi:remove_deprecated_useInheritedMediaQuery
Sep 24, 2026
Merged

sfshaza2 merged 5 commits into
flutter:mainfrom
AbdeMohlbi:remove_deprecated_useInheritedMediaQuery

Conversation

@AbdeMohlbi

@AbdeMohlbi AbdeMohlbi commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

This change adds useInheritedMediaQuery removal breaking change entry and migration guide.

unblocks :

PRs or commits this PR depends on (if any):

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@flutter-website-bot

flutter-website-bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit 7d02638):

https://flutter-docs-prod--docs-pr13916-remove-deprecated-usei-6n8ui4u8.web.app

@AbdeMohlbi AbdeMohlbi changed the title Remove deprecated useInheritedMediaQuery Add useInheritedMediaQuery removal breaking change entry and migration guide Sep 22, 2026
@AbdeMohlbi
AbdeMohlbi marked this pull request as ready for review September 22, 2026 12:46
@AbdeMohlbi
AbdeMohlbi requested review from a team and sfshaza2 as code owners September 22, 2026 12:46

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request documents the removal of the useInheritedMediaQuery property from the Flutter framework by adding a new breaking change page and updating the breaking changes index. The review feedback focuses on improving the documentation's clarity and style-guide compliance, specifically by using code font for API names and classes, applying the Oxford comma, correcting grammatical errors, and updating the API documentation links for MaterialApp and CupertinoApp to point to the core Flutter API reference instead of pub.dev.

Comment thread sites/docs/src/content/release/breaking-changes/remove-useInheritedMediaQuery.md Outdated
Comment thread sites/docs/src/content/release/breaking-changes/remove-useInheritedMediaQuery.md Outdated
Comment thread sites/docs/src/content/release/breaking-changes/remove-useInheritedMediaQuery.md Outdated
AbdeMohlbi and others added 3 commits September 22, 2026 19:12
…ritedMediaQuery.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…ritedMediaQuery.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…ritedMediaQuery.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@sfshaza2

sfshaza2 commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Hi, @AbdeMohlbi! Sorry to hear that you only tolerate Dart. ;) I asked @justinmc and he tells me that this property probably should be deprecated, but it hasn't been. Other than the bot's comment about referencing Material and Cupertino from the core API (which is wrong), I agree with the other bot feedback. I've asked Justin to weigh in on this PR.

@sfshaza2
sfshaza2 requested a review from justinmc September 22, 2026 18:16
@flutter-website-bot

flutter-website-bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Staged preview of the updated flutter.dev site (updated for commit dc26d36):

https://flutter-dev-230821--www-pr13916-remove-deprecated-usei-e25ajkps.web.app

@AbdeMohlbi

Copy link
Copy Markdown
Member Author

Hi, @AbdeMohlbi! Sorry to hear that you only tolerate Dart. ;)

Yeah long story i have some bad history with dart, but things are getting better :⁠-⁠P

No issue hopefully justin can review this one before the 3.50 cut.

Thanks for the quick review @sfshaza2 !

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍 . We should probably include a dart fix as mentioned in a comment below. Otherwise, this parameter has been deprecated for over 3 years, so I think this clean up makes a lot of sense. Thank you for doing it! Is there any reason you want to remove it, or just cleanup?

Comment thread sites/docs/src/content/release/breaking-changes/remove-useInheritedMediaQuery.md Outdated
Comment on lines +29 to +31
:::important
This migration isn't supported by `dart fix`.
:::

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it could be by using removeParameter right? What do you think about including a dart fix for this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

not sure how create/edit dart fixes tbh

Comment on lines +35 to +36
Landed in version: TBD<br>
In stable release: TBD

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't forget these when ready.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

you mean when the new stable is cut right ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes

@AbdeMohlbi

AbdeMohlbi commented Sep 22, 2026 •

Copy link
Copy Markdown
Member Author

LGTM 👍 . We should probably include a dart fix as mentioned in a comment below. Otherwise, this parameter has been deprecated for over 3 years, so I think this clean up makes a lot of sense. Thank you for doing it! Is there any reason you want to remove it, or just cleanup?

Not sure how to create new dart fixes, any guidance on that ?

Well yes it's mostly cleanup, the framework has a lot of tech debt

@sfshaza2

Copy link
Copy Markdown
Contributor

I'm going to land this. Thx, @AbdeMohlbi, tolerator of Dart! ;)

@sfshaza2 sfshaza2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm. Dart fix isn't a website issue, so I leave that to the collective eng folk...

@sfshaza2
sfshaza2 merged commit f23aedc into flutter:main Sep 24, 2026
14 checks passed
@AbdeMohlbi

Copy link
Copy Markdown
Member Author

lgtm. Dart fix isn't a website issue, so I leave that to the collective eng folk...

well that's the problem if we decided to create a dart fix we should update this document, still we can fix it later i guess.

@AbdeMohlbi

Copy link
Copy Markdown
Member Author

I'm going to land this. Thx, @AbdeMohlbi, tolerator of Dart! ;)

hmmm, so we are going to ignore the go (golang) part, i love go at this point so some updates can be made :⁠-⁠P

@justinmc

Copy link
Copy Markdown
Contributor

@AbdeMohlbi Here is an example of a similar dart fix: https://github.com/flutter/flutter/blob/master/packages/flutter_test/lib/fix_data/fix_flutter_test/fix_animation_sheet_builder.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants