Skip to main content

Remove useInheritedMediaQuery

The `useInheritedMediaQuery` property has been removed from the Flutter framework.

Summary

#

The useInheritedMediaQuery properties in WidgetsApp, MaterialApp, and CupertinoApp were removed because these widget never introduced their own MediaQuery, the View widget takes care of that.

Context

#

Historically, Flutter used useInheritedMediaQuery to determine whether a WidgetsApp, MaterialApp, or CupertinoApp should inherit the MediaQuery from its parent. This became redundant when MediaQuery inheritance became the default behavior.

Migration guide

#

If your code previously used useInheritedMediaQuery, you can migrate it by deleting any usage of the property.

dart
useInheritedMediaQuery: true,
dart
useInheritedMediaQuery: false,

Timeline

#

Landed in version: TBD
In stable release: TBD

References

#

API documentation:

Relevant PRs: