setPreferredPhy method
Future<void>
setPreferredPhy({
- required String deviceId,
- required BluetoothPhy txPhy,
- required BluetoothPhy rxPhy,
- 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,
});
}