getPairedDevices method
Get paired devices
Implementation
Future<List<BluetoothDevice>> getPairedDevices() async {
try {
final List<dynamic> devices =
await _channel.invokeMethod('getPairedDevices');
return devices.map((device) => BluetoothDevice.fromMap(device)).toList();
} catch (e) {
throw BluetoothException('Failed to get paired devices: $e');
}
}