getSize static method

double getSize()

Implementation

static double getSize() {
  Orientation orientation = MediaQuery.of(Get.context!).orientation;
  var size = MediaQuery.of(Get.context!).size;
  double dim = (orientation == Orientation.portrait)
      ? size.height / 4
      : size.width / 4.5;
  if (orientation == Orientation.portrait) {
    dim = size.height / 4;
    if (size.width < 600) {
      dim = size.height / 4.4;
    } else {
      // is Tablette
      dim = size.height / 5.4;
    }
  } else if (orientation == Orientation.landscape) {
    dim = size.width / 4.5;
    if (size.height >= 400 && size.height <= 500) {
      dim = size.width / 4.5;
    } else if (size.height > 500) {
      dim = size.width / 4.3;
    }
  }
  return dim;
}