JPlatformInfo class

A utility class for identifying the current platform and its capabilities.

The PlatformInfo class provides static properties and methods to determine the type of platform the app is running on, such as mobile, desktop, or web. It also includes functionality to check the device's internet connectivity.

Constructors

JPlatformInfo()

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
Indicates if the app is running on an Android platform.
no setter
isDesktop → bool
Indicates if the app is running on a desktop platform (not web).
no setter
isDesktopOrWeb → bool
Indicates if the app is running on a desktop platform or the web.
no setter
isIOS → bool
Indicates if the app is running on an iOS platform.
no setter
isLinux → bool
Indicates if the app is running on a Linux platform.
no setter
isMacOS → bool
Indicates if the app is running on a macOS platform.
no setter
isMobile → bool
Indicates if the app is running on a mobile platform (not web).
no setter
isWindows → bool
Indicates if the app is running on a Windows platform.
no setter
pixelRatio → double
The pixel density of the device's display.
no setter