PlatformUtil class

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
no setter
isApple → bool
是否为苹果平台 (iOS/macOS)
no setter
isDesktop → bool
是否为桌面端平台 (Windows/macOS/Linux)
no setter
isFuchsia → bool
no setter
isIOS → bool
no setter
isLinux → bool
no setter
isMacOS → bool
no setter
isMobile → bool
是否为移动端平台 (Android/iOS)
no setter
isOhos → bool
no setter
isWeb → bool
no setter
isWindows → bool
no setter
localHostname → String
获取本地主机名 (仅非Web平台)
no setter
numberOfProcessors → int
获取处理器数量 (仅非Web平台)
no setter
osVersion → String
获取操作系统版本号 (仅非Web平台)
no setter
platformName → String
获取当前平台名称 返回: 'android', 'ios', 'windows', 'macos', 'linux', 'fuchsia', 'ohos', 'web'
no setter
platformType → PlatformType
获取平台类型枚举
no setter
script → String
获取脚本路径 (仅非Web平台)
no setter