PlatformUtil class
Web-safe platform detection using Flutter's compile-time target flags.
Prefer these getters over dart:io Platform checks so code works on web.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- isAndroid → bool
-
truewhen running on Android.no setter - isDesktop → bool
-
trueon Windows, macOS, or Linux (desktop targets).no setter - isFuchsia → bool
-
truewhen running on Fuchsia.no setter - isIOS → bool
-
truewhen running on iOS.no setter - isLinux → bool
-
truewhen running on Linux.no setter - isMacOS → bool
-
truewhen running on macOS.no setter - isMobile → bool
-
trueon Android or iOS (native mobile targets).no setter - isWeb → bool
-
truewhen compiled for web.no setter - isWindows → bool
-
truewhen running on Windows.no setter