haveBluetooth method

bool haveBluetooth()

Implementation

bool haveBluetooth() {
  final deviceList = AudioManager().getAvailableAudioInputs();
  for (AudioDevice device in deviceList) {
    if (device.type == AudioDeviceType.bluetoothA2dp ||
        device.type == AudioDeviceType.bluetoothLe ||
        device.type == AudioDeviceType.bluetoothSco ) {
      return true;
    }
  }
  return false;
}