PlatformInfo class
Holds information about the current platform and host.
- Implemented types
Constructors
- PlatformInfo({required PlatformMedia platformMedia, required PlatformHost platformHost})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDebug → bool
-
true
when the app is running in debug mode,false
for releaseno setteroverride - nativePlatform → NativePlatform
-
Shortcut to test if app is running on an Android phone or tablet (not as a web app)
no setteroverride
- platformDesignSystem → PlatformDesignSystem
-
Returns the most appropriate
PlatformDesignSystem
for the current hostno setteroverride - platformHost → PlatformHost
-
After considering
platformMedia
, which host is running the app?final - platformMedia → PlatformMedia
-
What kind of platform the app is running?
final
- 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
- platformInfo → PlatformInfo
-
Returns the cached instance of current platform info or fetch that info for the first time
no setter