isWeb static method

bool isWeb()

判断当前运行环境是否为Web

返回值: bool,Web则返回 true

示例:

if (DeviceUtil.isWeb()) {
  print("Web端运行");
}

Implementation

static bool isWeb() {
  return GetPlatform.isWeb;
}