BluetoothAdapterInfo constructor
const
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>{},
创建适配器信息。
参数:
isSupported:是否支持蓝牙,无默认值。state:当前适配器状态,无默认值。name:适配器名称,默认null。Android 需要连接权限;Linux 可能返回 BlueZ 名称; iOS/macOS/Windows/Web 通常不公开。address:适配器地址,默认null。Android 可能受系统限制;Linux/Windows 可能返回本机蓝牙地址; iOS/macOS/Web 不公开。isBleSupported:是否支持 BLE,默认false。isMultipleAdvertisementSupported:是否支持多广播,默认false;主要 Android 能力。isOffloadedFilteringSupported:是否支持硬件离线过滤,默认false;Android 能力。isOffloadedScanBatchingSupported:是否支持硬件批量扫描,默认false;Android 能力。isLe2MPhySupported:是否支持 LE 2M PHY,默认false;Android 8.0+ 能力。isLeCodedPhySupported:是否支持 LE Coded PHY,默认false;Android 8.0+ 能力。isLeExtendedAdvertisingSupported:是否支持扩展广播,默认false;Android 8.0+ 能力。isLePeriodicAdvertisingSupported:是否支持周期广播,默认false;Android 8.0+ 能力。isDiscovering:当前是否正在扫描/发现,默认false;Web 仅表示设备选择器是否打开。raw:原生完整字段,默认const <String, dynamic>{}。
Implementation
const BluetoothAdapterInfo({
required this.isSupported,
required this.state,
this.name,
this.address,
this.isBleSupported = false,
this.isMultipleAdvertisementSupported = false,
this.isOffloadedFilteringSupported = false,
this.isOffloadedScanBatchingSupported = false,
this.isLe2MPhySupported = false,
this.isLeCodedPhySupported = false,
this.isLeExtendedAdvertisingSupported = false,
this.isLePeriodicAdvertisingSupported = false,
this.isDiscovering = false,
this.raw = const <String, dynamic>{},
});