mediaQuery method

MediaQueryData mediaQuery({
  1. required BuildContext context,
})

Implementation

MediaQueryData mediaQuery({
  required BuildContext context,
}) {
  final mediaQuery = MediaQuery.of(context);
  final viewPadding = mediaQuery.padding;

  final deviceQuery = mediaQuery.copyWith(
    size: Size(_width, _height),
    padding: viewPadding,
    viewInsets: EdgeInsets.zero,
    viewPadding: viewPadding,
    devicePixelRatio: device.resolution.scaleFactor,
  );

  return deviceQuery;
}