GeneralPlatform class
Provides platform-specific information and utilities using the Dart Platform
class.
This class offers static boolean getters to determine the current platform
based on the Dart platform information provided by the Platform
class.
Constructors
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
-
Returns
true
if the current platform is Android.no setter - isDesktop → bool
-
Returns
true
if the current platform is desktop (macOS, Windows, or Linux).no setter - isFuchsia → bool
-
Returns
true
if the current platform is Fuchsia.no setter - isIOS → bool
-
Returns
true
if the current platform is iOS.no setter - isLinux → bool
-
Returns
true
if the current platform is Linux.no setter - isMacOS → bool
-
Returns
true
if the current platform is macOS.no setter - isWeb → bool
-
Returns
true
if the current platform is the web.no setter - isWindows → bool
-
Returns
true
if the current platform is Windows.no setter