getConnectedUsbDevices method
Get supported USB payment readers currently attached to Android.
Implementation
@override
Future<List<UsbDeviceInfo>> getConnectedUsbDevices() async {
final result = await methodChannel.invokeMethod<List<dynamic>>(
'getConnectedUsbDevices',
);
return (result ?? const [])
.map(
(item) =>
UsbDeviceInfo.fromMap(Map<String, dynamic>.from(item as Map)),
)
.toList();
}