PlatformUtils class
Utilities for platform detection.
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
- currentPlatform → ResponsivePlatform
-
Gets the current platform.
no setter
- isAndroid → bool
-
Returns true if running on Android.
no setter
- isDesktop → bool
-
Returns true if running on a desktop platform.
no setter
- isIOS → bool
-
Returns true if running on iOS.
no setter
- isLinux → bool
-
Returns true if running on Linux.
no setter
- isMacOS → bool
-
Returns true if running on macOS.
no setter
- isMobile → bool
-
Returns true if running on a mobile platform (iOS or Android).
no setter
- isWeb → bool
-
Returns true if running on web.
no setter
- isWindows → bool
-
Returns true if running on Windows.
no setter
- supportsLandscape → bool
-
Returns true if the current platform typically supports landscape.
no setter
Constants
-
landscapePlatforms
→ const List<
ResponsivePlatform> - Platforms that typically use landscape orientation.