PlatformUtils class

平台获取类型工具类

Constructors

PlatformUtils()

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 Methods

get({BuildContext? context}) → dynamic
返回值或运行基于平台的函数。 如果传递了上下文,它将通过 Theme.of(context).platform 获取平台。 否则,它将使用 defaultTargetPlatform。
select<T>({BuildContext? context, dynamic android, dynamic ios, dynamic fuchsia, dynamic web, dynamic macOS, dynamic windows, dynamic linux, dynamic defaultWhenNull}) → T