currentHost property

Platforms currentHost

The application's host operating system. In the example of running Flutter web on an iPhone, the host would be iOS.

Implementation

Platforms get currentHost {
  if (overrideHost != null) {
    return overrideHost!;
  }

  switch (defaultTargetPlatform) {
    case TargetPlatform.android:
      return Platforms.android;
    case TargetPlatform.fuchsia:
      return Platforms.fuschia;
    case TargetPlatform.iOS:
      return Platforms.iOS;
    case TargetPlatform.linux:
      return Platforms.linux;
    case TargetPlatform.macOS:
      return Platforms.macOS;
    case TargetPlatform.windows:
      return Platforms.windows;
  }
}