setPreferredPhy method

  1. @override
Future<void> setPreferredPhy({
  1. required String deviceId,
  2. required BluetoothPhy txPhy,
  3. required BluetoothPhy rxPhy,
  4. int phyOptions = 0,
})
override

实现 FlutterBluetoothPluginPlatform.setPreferredPhy

参数、默认值、平台差异和推荐值见平台接口文档。

Implementation

@override
Future<void> setPreferredPhy({
  required String deviceId,
  required BluetoothPhy txPhy,
  required BluetoothPhy rxPhy,
  int phyOptions = 0,
}) async {
  await methodChannel.invokeMethod<void>('setPreferredPhy', <String, dynamic>{
    'deviceId': deviceId,
    'txPhy': txPhy.name,
    'rxPhy': rxPhy.name,
    'phyOptions': phyOptions,
  });
}