platformName property

String get 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.isFuchsia) {
      return "Fuchsia";
    } else if (Platform.isLinux) {
      return "Linux";
    } else if (Platform.isMacOS) {
      return "macOS";
    } else if (Platform.isWindows) {
      return "Windows";
    } else {
      return "Unknown";
    }
  }
}