startAdvertising method

  1. @override
Future<void> startAdvertising({
  1. BluetoothAdvertisementData advertisementData = const BluetoothAdvertisementData(),
  2. BluetoothAdvertisementData? scanResponse,
  3. 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.');
}