MediaQuery provides a higher-level view of the current app’s screen size and can also give more detailed information about the device and its layout preferences . In practice, MediaQuery is always there. It can simply be accessed by calling MediaQuery. of in the build method.