requestPreferredPhy method

Future<void> requestPreferredPhy({
  1. required String deviceAddress,
  2. required BlePhy txPhy,
  3. required BlePhy rxPhy,
})

Requests a preferred PHY (physical layer) for the connection to the specified device.

The request is a hint to the platform. The actual PHY used depends on what both the central and the peripheral support. If the requested PHY is not supported by the remote device, the connection stays on its current PHY.

On Android this calls BluetoothGatt.setPreferredPhy and requires API 26+. On iOS, PHY negotiation is handled automatically by the OS; this call succeeds silently without changing any platform state.

Implementation

Future<void> requestPreferredPhy({
  required String deviceAddress,
  required BlePhy txPhy,
  required BlePhy rxPhy,
}) async {
  throw UnimplementedError(
    'requestPreferredPhy() has not been implemented.',
  );
}