BluetoothAdapterInfo class
蓝牙适配器信息和能力摘要。
Constructors
-
BluetoothAdapterInfo({required bool isSupported, required BluetoothAdapterState state, String? name, String? address, bool isBleSupported = false, bool isMultipleAdvertisementSupported = false, bool isOffloadedFilteringSupported = false, bool isOffloadedScanBatchingSupported = false, bool isLe2MPhySupported = false, bool isLeCodedPhySupported = false, bool isLeExtendedAdvertisingSupported = false, bool isLePeriodicAdvertisingSupported = false, bool isDiscovering = false, Map<
String, dynamic> raw = const <String, dynamic>{}}) -
创建适配器信息。
const
-
BluetoothAdapterInfo.fromMap(Map<
String, dynamic> map) -
从原生 Map 创建适配器信息。
factory
Properties
- address → String?
-
适配器地址,默认
null;Web 不公开,Linux/Windows 可能返回本机蓝牙地址。final - hashCode → int
-
The hash code for this object.
no setterinherited
- isBleSupported → bool
-
是否支持 BLE,默认
false。final - isDiscovering → bool
-
当前是否正在扫描/发现,默认
false;Web 仅表示设备选择器是否打开。final - isLe2MPhySupported → bool
-
是否支持 LE 2M PHY,默认
false;Android 8.0+ 能力。final - isLeCodedPhySupported → bool
-
是否支持 LE Coded PHY,默认
false;Android 8.0+ 能力。final - isLeExtendedAdvertisingSupported → bool
-
是否支持扩展广播,默认
false;Android 8.0+ 能力。final - isLePeriodicAdvertisingSupported → bool
-
是否支持周期广播,默认
false;Android 8.0+ 能力。final - isMultipleAdvertisementSupported → bool
-
是否支持多广播,默认
false;主要 Android 有意义。final - isOffloadedFilteringSupported → bool
-
是否支持硬件离线过滤,默认
false;Android 能力。final - isOffloadedScanBatchingSupported → bool
-
是否支持硬件批量扫描,默认
false;Android 能力。final - isSupported → bool
-
是否支持蓝牙。
final
- name → String?
-
适配器名称,默认
null;Linux 可能返回 BlueZ 名称,Web/Windows 通常不公开。final -
raw
→ Map<
String, dynamic> -
原生完整字段,默认空 Map。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → BluetoothAdapterState
-
当前适配器状态。
final
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