mediaQuery property

MediaQueryData mediaQuery

The MediaQueryData from the closest instance of this class that encloses the given context.

You can use this getter to query the size and orientation of the screen, as well as other media parameters. When that information changes, your widget will be scheduled to be rebuilt, keeping your widget up-to-date.

Implementation

MediaQueryData get mediaQuery => MediaQuery.of(this);