bluetoothBondStateFromString function

BluetoothBondState bluetoothBondStateFromString(
  1. String? value
)

将原生字符串转换为 BluetoothBondState

参数:

Implementation

BluetoothBondState bluetoothBondStateFromString(String? value) {
  return BluetoothBondState.values.firstWhere(
    (state) => state.name == value,
    orElse: () => BluetoothBondState.unknown,
  );
}