getPairedDevices method
Get list of paired devices
Implementation
@override
Future<List<BluetoothDeviceModel>> getPairedDevices() async {
try {
final result = await _methodChannel.invokeMethod<List>('getPairedDevices');
return (result ?? [])
.map((device) => BluetoothDeviceModel.fromMap(Map<String, dynamic>.from(device)))
.toList();
} catch (e) {
throw BluetoothException('Failed to get paired devices: $e');
}
}