bluetoothConnectionStateFromString function

BluetoothConnectionState bluetoothConnectionStateFromString(
  1. String? value
)

将原生字符串转换为 BluetoothConnectionState

参数:

Implementation

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