startAdvertising method
Future<void>
startAdvertising({
- BluetoothAdvertisementData advertisementData = const BluetoothAdvertisementData(),
- BluetoothAdvertisementData? scanResponse,
- BluetoothAdvertisingSettings settings = const BluetoothAdvertisingSettings(),
override
实现 FlutterBluetoothPluginPlatform.startAdvertising。
Web Bluetooth 不支持 BLE 外设/广播模式。
Implementation
@override
Future<void> startAdvertising({
BluetoothAdvertisementData advertisementData =
const BluetoothAdvertisementData(),
BluetoothAdvertisementData? scanResponse,
BluetoothAdvertisingSettings settings =
const BluetoothAdvertisingSettings(),
}) {
throw UnsupportedError(
'BLE advertising is not supported by Web Bluetooth.');
}