operatingSystem property

String get operatingSystem

Gets the operating system name as a lowercase string.

Returns:

  • "web" for web browsers.
  • "macos" for macOS.
  • "windows" for Windows.
  • "linux" for Linux.
  • "android" for Android.
  • "ios" for iOS.
  • "fuchsia" for Fuchsia.

Implementation

static String get operatingSystem {
  switch (value) {
    case PlatformType.Web:
      return 'web';
    case PlatformType.MacOS:
      return 'macos';
    case PlatformType.Windows:
      return 'windows';
    case PlatformType.Linux:
      return 'linux';
    case PlatformType.Android:
      return 'android';
    case PlatformType.IOS:
      return 'ios';
    case PlatformType.Fuchsia:
      return 'fuchsia';
  }
}