Skip to content

Deprecation of useInheritedMediaQuery: true in DevicePreview Example #265

Open
@sufyankamil

Description

@sufyankamil

The example provided in the README file, the useInheritedMediaQuery: true property has been deprecated. This leads to a warning when running the code, as it is no longer supported in the latest Flutter versions.

Here is the relevant code from the README:

MaterialApp(
  useInheritedMediaQuery: true, // **Deprecated**
  locale: DevicePreview.locale(context),
  builder: DevicePreview.appBuilder,
  theme: ThemeData.light(),
  darkTheme: ThemeData.dark(),
  home: const HomePage(),
)

Suggested Fix:

You may want to remove or replace useInheritedMediaQuery: true with an updated approach, or suggest using the appropriate alternative for handling media queries in the current Flutter version.

#226

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions