getOS static method

OSType getOS()

Returns the current OS.

Implementation

static OSType getOS() {
  if (kIsWeb) return OSType.web;
  if (Platform.isAndroid) return OSType.android;
  if (Platform.isIOS) return OSType.iOS;
  if (Platform.isWindows) return OSType.windows;
  if (Platform.isMacOS) return OSType.macOS;
  if (Platform.isLinux) return OSType.linux;
  if (Platform.isFuchsia) return OSType.fuchsia;
  return OSType.unknown;
}