platform property

PlatformType get platform

Implementation

PlatformType get platform {
  if (i._platform != null && i._platform != PlatformType.system) {
    return i._platform!;
  }
  if (kIsWeb) return PlatformType.web;
  if (kIsWasm) return PlatformType.wasm;
  if (Platform.isAndroid) return PlatformType.android;
  if (Platform.isIOS) return PlatformType.ios;
  if (Platform.isFuchsia) return PlatformType.fuchsia;
  if (Platform.isMacOS) return PlatformType.macos;
  if (Platform.isWindows) return PlatformType.windows;
  if (Platform.isLinux) return PlatformType.linux;
  return PlatformType.system;
}
set platform (PlatformType type)

Implementation

set platform(PlatformType type) {
  i._platform = type;
  i.notifyListeners();
}