bluetoothPhyFromString function

BluetoothPhy bluetoothPhyFromString(
  1. String? value
)

将原生字符串转换为 BluetoothPhy

参数:

Implementation

BluetoothPhy bluetoothPhyFromString(String? value) {
  return BluetoothPhy.values.firstWhere(
    (phy) => phy.name == value,
    orElse: () => BluetoothPhy.unknown,
  );
}