getSizeDevice static method

Size getSizeDevice(
  1. double? widthSize,
  2. double? heightSize
)

Implementation

static Size getSizeDevice(double? widthSize, double? heightSize) {
  // Size? size = WidgetsBinding.instance.window.physicalSize;
  var width = widthSize ?? 375;
  var height = heightSize ?? 840;
  // if (size != null) {
  //   logger.d("SIZE DEVICE: ========(H:${size.height} - W:${size.width})");
  //   logger.d("SIZE DEVICE: ========(${size.height / size.width})");
  //   final sizeMath = size.height / size.width;
  //   if (sizeMath < 1.66) {
  //     width = 375;
  //     height = 667;
  //   } else if (sizeMath < 1.67) {
  //     if (size.height < 1000) {
  //       width = 375;
  //       height = 812;
  //     } else {
  //       width = 375;
  //       height = 620;
  //     }
  //   } else if (sizeMath < 1.94) {
  //     width = 375;
  //     height = 667;
  //   } else if (sizeMath < 2.2) {
  //     if (size.height < 2778) {
  //       width = 375;
  //       height = 812;
  //     } else {
  //       width = 375;
  //       height = 860;
  //     }
  //   } else {
  //     width = 375;
  //     height = 812;
  //   }
  // }
  // logger.d("SIZE DEVICE: ========(WIDTH : $width - HEIGHT : $height)");
  return Size(width, height);
}