getPairedDevices method

Future<List<BluetoothDevice>> getPairedDevices()

Implementation

Future<List<BluetoothDevice>> getPairedDevices() async {
  try {
    return await FlutterBluetoothSerial.instance.getBondedDevices();
  } catch (e) {
    print('Error getting paired devices: $e');
    return [];
  }
}