MediaQuery constructor

const MediaQuery({Key key, @required MediaQueryData data, @required Widget child })

Creates a widget that provides MediaQueryData to its descendants.

The data and child arguments must not be null.

Implementation

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