isLandscape static method

bool isLandscape()

判断屏幕方向是否为横屏

返回值: bool,横屏为 true

示例:

if (DeviceUtil.isLandscape()) {
  print("横屏模式");
}

Implementation

static bool isLandscape() {
  return Get.context!.isLandscape;
}