hasPermission method

  1. @override
Future<bool> hasPermission(
  1. UsbDevice device
)
override

Whether the app already has permission to access device.

Implementation

@override
Future<bool> hasPermission(UsbDevice device) async {
  final result = await methodChannel.invokeMethod<bool>('hasPermission', {
    'vendorId': device.vendorId,
    'productId': device.productId,
  });
  return result ?? false;
}