DeviceQuery constructor

DeviceQuery({
  1. Key? key,
  2. DeviceQueryData? data,
  3. BuildContext? context,
  4. MediaQueryData? mediaQueryData,
  5. required Widget child,
})

Creates a widget that provides DeviceQueryData to its descendants.

The data and child arguments must not be null.

Implementation

DeviceQuery({
  Key? key,
  DeviceQueryData? data,
  BuildContext? context,
  MediaQueryData? mediaQueryData,
  required Widget child,
})  : data = data ??
          DeviceQueryData.detect(
            context: context,
            mediaQueryData: mediaQueryData,
          ),
      super(key: key, child: child);