getDevices method

  1. @override
Future<List<UsbDevice>> getDevices()
override

Implementation

@override
Future<List<UsbDevice>> getDevices() async {
  final devices =
      (await methodChannel.invokeMethod<List<dynamic>>('getDevices')) ?? [];

  return devices.map((device) => UsbDevice.fromMap(device)).toList();
}