BluetoothAdapterState enum

蓝牙适配器状态。

Android/iOS/macOS 会映射系统状态;Web 会根据 Web Bluetooth availability 映射 poweredOn/poweredOff,不支持时使用 unsupported;未知或无法识别的原生值会映射为 unknown

Inheritance
Available extensions

Values

unknown → const BluetoothAdapterState

状态未知,通常表示原生侧返回了未识别状态。

unsupported → const BluetoothAdapterState

当前平台或设备不支持蓝牙。

unauthorized → const BluetoothAdapterState

蓝牙权限未授权或被系统限制。

poweredOff → const BluetoothAdapterState

蓝牙已关闭。

poweredOn → const BluetoothAdapterState

蓝牙已开启。扫描、连接、广播前推荐确认处于该状态。

resetting → const BluetoothAdapterState

蓝牙适配器正在重置。

turningOn → const BluetoothAdapterState

蓝牙正在开启。

turningOff → const BluetoothAdapterState

蓝牙正在关闭。

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
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

Constants

values → const List<BluetoothAdapterState>
A constant List of the values in this enum, in order of their declaration.