getPlatformName static method
获取平台名称字符串
Implementation
static String getPlatformName() {
switch (getPlatformType()) {
case PlatformType.android:
return 'Android';
case PlatformType.ios:
return 'iOS';
case PlatformType.macos:
return 'macOS';
case PlatformType.windows:
return 'Windows';
case PlatformType.linux:
return 'Linux';
case PlatformType.web:
return 'Web';
case PlatformType.unknown:
return 'Unknown';
}
}