CurrentPlatform class

Utility class that provides information on the current platform

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

debugPlatformOverride ↔ PlatformType?
Overrides the detected platform. Tests only - set it back to null in a tearDown.
getter/setter pair
isAndroid → bool
True if the app is running on android
no setter
isDesktop → bool
True if the app is running on a desktop platform
no setter
isFlutterTest → bool
True if the app is running in test environment
no setter
isFuchsia → bool
True if the app is running on fuchsia
no setter
isIos → bool
True if the app is running on ios
no setter
isLinux → bool
True if the app is running on linux
no setter
isMacOS → bool
True if the app is running on macos
no setter
isMobile → bool
True if the app is running on mobile
no setter
isWeb → bool
True if the app is running on web
no setter
isWindows → bool
True if the app is running on windows
no setter
name → String
Returns a string version of the platform
no setter
type → PlatformType
Get current platform type
no setter