platformName property
String
platformName
Implementation
static String get platformName {
if (kIsWeb) {
return 'Web';
} else if (Platform.isAndroid) {
return 'Android';
} else if (Platform.isIOS) {
return 'iOS';
} else if (Platform.isMacOS) {
return 'MacOS';
} else if (Platform.isWindows) {
return 'Windows';
} else if (Platform.isLinux) {
return 'Linux';
} else {
return 'Unknown';
}
}