MediaQuery constructor Null safety

const MediaQuery(
  1. {Key? key,
  2. required MediaQueryData data,
  3. required Widget child}
)

Creates a widget that provides MediaQueryData to its descendants.

The data and child arguments must not be null.

Implementation

const MediaQuery({
  super.key,
  required this.data,
  required super.child,
}) : assert(child != null),
     assert(data != null);