📱 Flutter Intermediate

What is MediaQuery in Flutter?

Answer

MediaQuery provides information about the device screen and accessibility settings. Access it via MediaQuery.of(context). Key properties include size (screen dimensions), padding (safe area insets for notches/home bar), viewInsets (keyboard height when visible), orientation, textScaleFactor (user font scaling), and platformBrightness (light/dark mode). It is essential for building responsive layouts and respecting the device's safe areas.