isDesktop static method
判断当前运行环境是否为桌面系统(Windows/MacOS/Linux)
返回值: bool,桌面端则返回 true
示例:
if (DeviceUtil.isDesktop()) {
print("Desktop端运行");
}
Implementation
static bool isDesktop() {
return GetPlatform.isWindows || GetPlatform.isMacOS || GetPlatform.isLinux;
}