A cross-platform (Android/Windows/macOS/Linux) USB plugin for Flutter

Related tags

Desktop quick_usb
Overview

quick_usb

A cross-platform (Android/Windows/macOS/Linux) USB plugin for Flutter

Usage

List devices

await QuickUsb.init();
// ...
var deviceList = await QuickUsb.getDeviceList();
// ...
await QuickUsb.exit();

List devices with additional description

Returns devices list with manufacturer, product and serial number description.

Any of these attributes can be null.

On Android user will be asked for permission for each device if needed.

var descriptions = await QuickUsb.getDevicesWithDescription();
var deviceList = descriptions.map((e) => e.device).toList();
print('descriptions $descriptions');

Get device description

Returns manufacturer, product and serial number description for specified device.

Any of these attributes can be null.

On Android user will be asked for permission if needed.

 var description = await QuickUsb.getDeviceDescription(device);
 print('description ${description.toMap()}');

Check/Request permission

Android Only

var hasPermission = await QuickUsb.hasPermission(device);
print('hasPermission $hasPermission');
// ...
await QuickUsb.requestPermission(device);

Open/Close device

var openDevice = await QuickUsb.openDevice(device);
print('openDevice $openDevice');
// ...
await QuickUsb.closeDevice();

Get/Set configuration

var configuration = await QuickUsb.getConfiguration(index);
print('getConfiguration $configuration');
// ...
var setConfiguration = await QuickUsb.setConfiguration(configuration);
print('setConfiguration $getConfiguration');

Claim/Release interface

var claimInterface = await QuickUsb.claimInterface(interface);
print('claimInterface $claimInterface');
// ...
var releaseInterface = await QuickUsb.releaseInterface(interface);
print('releaseInterface $releaseInterface');

Bulk transfer in/out

var bulkTransferIn = await QuickUsb.bulkTransferIn(endpoint, 1024, timeout: 2000);
print('bulkTransferIn ${hex.encode(bulkTransferIn)}');
// ...
var bulkTransferOut = await QuickUsb.bulkTransferOut(endpoint, data, timeout: 2000);
print('bulkTransferOut $bulkTransferOut');

Set auto detach kernel driver

Enable/disable libusb's automatic kernel driver detachment on linux. When this is enabled libusb will automatically detach the kernel driver on an interface when claiming the interface, and attach it when releasing the interface.

Automatic kernel driver detachment is disabled on newly opened device handles by default.

This is supported only on linux, on other platforms this function does nothing.

await QuickUsb.setAutoDetachKernelDriver(true);
Comments
  • openDevice always returns false for connected usb devices / android phone when running example

    openDevice always returns false for connected usb devices / android phone when running example

    I might be missing something here.. but running example/lib/main.dart and clicking on openDevices button always returns false for my connected android phone.

    I am running the example on windows 10 development.

    My phone is in developer mode and usb debugging is on.

    Check permission comes out as true.

    Is there any step to this because i cannot getConfiguration until openDevice returns true.

    Sorry if the question comes out as mundane.

    Thank you.

    opened by jyashi 14
  • Cannot detect usb connected devices on macOS Monterey

    Cannot detect usb connected devices on macOS Monterey

    void main() async { await QuickUsb.init(); var deviceList = await QuickUsb.getDeviceList() .then((value) => print("debug device list $value"));

    await GetStorage.init();

    The print outputs an empty list [] but running flutter devices shows me the correct list of connected devices.

    opened by jyashi 13
  • Not getting Manufacturer, product and Serial Number on Windows

    Not getting Manufacturer, product and Serial Number on Windows

    Hello, First of all thanks for the brilliant library. It works for me on MacOS. Now I am trying to use same device in windows 10 but it does not find the attached device. Any extra settings we need to do? I am getting null for all Manugacturer, product and serial number for windows.

    Let me know.

    Thanks

    opened by utpalruparel 11
  • build web issue

    build web issue

    i'm using this plugin only on android when i'm building the web i'm getting below error.

    b-0.3.23-nullsafety.0/lib/libusb64.dart:856:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_transfer> transfer, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:868:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_transfer> transfer, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:882:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_transfer> transfer, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:894:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_device_handle> dev_handle, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:899:21: Error: 'Uint8' isn't a type. ffi.Pointer<ffi.Uint8> data, ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:899:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Uint8> data, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:920:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_device_handle> dev_handle, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:922:21: Error: 'Uint8' isn't a type. ffi.Pointer<ffi.Uint8> data, ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:922:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Uint8> data, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:924:21: Error: 'Int32' isn't a type. ffi.Pointer<ffi.Int32> actual_length, ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:924:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Int32> actual_length, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:942:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_device_handle> dev_handle, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:944:21: Error: 'Uint8' isn't a type. ffi.Pointer<ffi.Uint8> data, ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:944:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Uint8> data, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:946:21: Error: 'Int32' isn't a type. ffi.Pointer<ffi.Int32> actual_length, ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:946:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Int32> actual_length, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:964:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_device_handle> dev_handle, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:966:21: Error: 'Uint8' isn't a type. ffi.Pointer<ffi.Uint8> data, ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:966:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Uint8> data, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:983:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:995:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1007:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1019:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1031:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1043:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1056:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1068:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1080:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1081:9: Error: 'Pointer' isn't a type. ffi.Pointer tv, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1094:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1095:9: Error: 'Pointer' isn't a type. ffi.Pointer tv, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1108:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1109:9: Error: 'Pointer' isn't a type. ffi.Pointer tv, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1110:21: Error: 'Int32' isn't a type. ffi.Pointer<ffi.Int32> completed, ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1110:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Int32> completed, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1126:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1138:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1139:21: Error: 'Int32' isn't a type. ffi.Pointer<ffi.Int32> completed, ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1139:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Int32> completed, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1153:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1154:9: Error: 'Pointer' isn't a type. ffi.Pointer tv, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1167:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1180:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1181:9: Error: 'Pointer' isn't a type. ffi.Pointer tv, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1194:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1206:21: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Pointer<libusb_pollfd>> pollfds, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1206:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Pointer<libusb_pollfd>> pollfds, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1218:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1219:21: Error: 'NativeFunction' isn't a type. ffi.Pointer<ffi.NativeFunction<libusb_pollfd_added_cb>> added_cb,
    ^^^^^^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1219:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.NativeFunction<libusb_pollfd_added_cb>> added_cb,
    ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1220:21: Error: 'NativeFunction' isn't a type. ffi.Pointer<ffi.NativeFunction<libusb_pollfd_removed_cb>> removed_cb,
    ^^^^^^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1220:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.NativeFunction<libusb_pollfd_removed_cb>> removed_cb,
    ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1221:21: Error: 'Void' isn't a type. ffi.Pointer<ffi.Void> user_data, ^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1221:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Void> user_data, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1269:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1275:21: Error: 'NativeFunction' isn't a type. ffi.Pointer<ffi.NativeFunction<libusb_hotplug_callback_fn>> cb_fn,
    ^^^^^^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1275:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.NativeFunction<libusb_hotplug_callback_fn>> cb_fn,
    ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1276:21: Error: 'Void' isn't a type. ffi.Pointer<ffi.Void> user_data, ^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1276:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Void> user_data, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1277:21: Error: 'Int32' isn't a type. ffi.Pointer<ffi.Int32> callback_handle, ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1277:9: Error: 'Pointer' isn't a type. ffi.Pointer<ffi.Int32> callback_handle, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1308:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1323:9: Error: 'Pointer' isn't a type. ffi.Pointer<libusb_context> ctx, ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1701:28: Error: 'Uint8' isn't a type. external ffi.Pointer<ffi.Uint8> extra; ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1701:16: Error: 'Pointer' isn't a type. external ffi.Pointer<ffi.Uint8> extra; ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1756:16: Error: 'Pointer' isn't a type. external ffi.Pointer<libusb_endpoint_descriptor> endpoint; ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1760:28: Error: 'Uint8' isn't a type. external ffi.Pointer<ffi.Uint8> extra; ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1760:16: Error: 'Pointer' isn't a type. external ffi.Pointer<ffi.Uint8> extra; ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1772:16: Error: 'Pointer' isn't a type. external ffi.Pointer<libusb_interface_descriptor> altsetting; ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1824:16: Error: 'Pointer' isn't a type. external ffi.Pointer<libusb_interface> interface_1; ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1828:28: Error: 'Uint8' isn't a type. external ffi.Pointer<ffi.Uint8> extra; ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1828:16: Error: 'Pointer' isn't a type. external ffi.Pointer<ffi.Uint8> extra; ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2023:28: Error: 'Int8' isn't a type. external ffi.Pointer<ffi.Int8> rc; ^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2023:16: Error: 'Pointer' isn't a type. external ffi.Pointer<ffi.Int8> rc; ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2026:28: Error: 'Int8' isn't a type. external ffi.Pointer<ffi.Int8> describe; ^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2026:16: Error: 'Pointer' isn't a type. external ffi.Pointer<ffi.Int8> describe; ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/quick _usb-0.3.0/lib/src/utils.dart:8:29: Error: 'IntPtr' isn't a type. final int _maxSize = sizeOf() == 8 ? _kMaxSmi64 : _kMaxSmi32;
    ^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/quick _usb-0.3.0/lib/src/utils.dart:8:22: Error: Method not found: 'sizeOf'. final int _maxSize = sizeOf() == 8 ? _kMaxSmi64 : _kMaxSmi32;
    ^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/allocation.dart:9:7: Error: 'DynamicLibrary' isn't a type. final DynamicLibrary stdlib = Platform.isWindows ^^^^^^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/allocation.dart:10:7: Error: Undefined name 'DynamicLibrary'. ? DynamicLibrary.open('kernel32.dll') ^^^^^^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/allocation.dart:11:7: Error: Undefined name 'DynamicLibrary'. : DynamicLibrary.process(); ^^^^^^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/allocation.dart:31:7: Error: 'Pointer' isn't a type. final Pointer processHeap = winGetProcessHeap(); ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/allocation.dart:67:5: Error: 'Pointer' isn't a type. Pointer result; ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/allocation.dart:91:13: Error: 'Pointer' isn't a type. void free(Pointer pointer) { ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/allocation.dart:109:7: Error: 'Allocator' isn't a type. const Allocator malloc = _MallocAllocator(); ^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/allocation.dart:132:5: Error: 'Pointer' isn't a type. Pointer result; ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/allocation.dart:157:13: Error: 'Pointer' isn't a type. void free(Pointer pointer) { ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/allocation.dart:176:7: Error: 'Allocator' isn't a type. const Allocator calloc = _CallocAllocator(); ^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/arena.dart:26:9: Error: 'Allocator' isn't a type. final Allocator _wrappedAllocator; ^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/arena.dart:29:22: Error: 'NativeType' isn't a type. final List<Pointer> _managedMemoryPointers = []; ^^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/arena.dart:29:14: Error: 'Pointer' isn't a type. final List<Pointer> _managedMemoryPointers = []; ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/arena.dart:40:10: Error: 'Allocator' isn't a type. Arena([Allocator allocator = calloc]) : _wrappedAllocator = allocator;
    ^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/arena.dart:101:21: Error: 'NativeType' isn't a type. void free(Pointer pointer) {} ^^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/arena.dart:101:13: Error: 'Pointer' isn't a type. void free(Pointer pointer) {} ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/arena.dart:120:6: Error: 'Allocator' isn't a type. [Allocator wrappedAllocator = calloc]) { ^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/arena.dart:144:6: Error: 'Allocator' isn't a type. [Allocator wrappedAllocator = calloc]) { ^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf8.dart:26:28: Error: 'Uint8' isn't a type. final codeUnits = cast(); ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf8.dart:43:28: Error: 'Uint8' isn't a type. final codeUnits = cast(); ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf8.dart:52:30: Error: 'Uint8' isn't a type. static int _length(Pointer codeUnits) { ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf8.dart:52:22: Error: 'Pointer' isn't a type. static int _length(Pointer codeUnits) { ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf8.dart:81:31: Error: 'Allocator' isn't a type. Pointer toNativeUtf8({Allocator allocator = malloc}) { ^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf8.dart:83:19: Error: 'Uint8' isn't a type. final Pointer result = allocator(units.length + 1);
    ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf8.dart:83:11: Error: 'Pointer' isn't a type. final Pointer result = allocator(units.length + 1);
    ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf8.dart:83:45: Error: 'Uint8' isn't a type. final Pointer result = allocator(units.length + 1);
    ^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:26:28: Error: 'Uint16' isn't a type. final codeUnits = cast(); ^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:43:28: Error: 'Uint16' isn't a type. final codeUnits = cast(); ^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:52:46: Error: 'Uint16' isn't a type. static String _toKnownLengthString(Pointer codeUnits, int length)
    => ^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:52:38: Error: 'Pointer' isn't a type. static String _toKnownLengthString(Pointer codeUnits, int length)
    => ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:55:48: Error: 'Uint16' isn't a type. static String _toUnknownLengthString(Pointer codeUnits) { ^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:55:40: Error: 'Pointer' isn't a type. static String _toUnknownLengthString(Pointer codeUnits) { ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:68:30: Error: 'Uint16' isn't a type. static int _length(Pointer codeUnits) { ^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:68:22: Error: 'Pointer' isn't a type. static int _length(Pointer codeUnits) { ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:93:33: Error: 'Allocator' isn't a type. Pointer toNativeUtf16({Allocator allocator = malloc}) { ^^^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:95:19: Error: 'Uint16' isn't a type. final Pointer result = allocator(units.length + 1);
    ^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:95:11: Error: 'Pointer' isn't a type. final Pointer result = allocator(units.length + 1);
    ^^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/ffi-1 .1.2/lib/src/utf16.dart:95:46: Error: 'Uint16' isn't a type. final Pointer result = allocator(units.length + 1);
    ^^^^^^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1592:16: Error: Only JS interop members may be 'external'. external int bLength; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1598:16: Error: Only JS interop members may be 'external'. external int bDescriptorType; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1603:16: Error: Only JS interop members may be 'external'. external int bcdUSB; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1607:16: Error: Only JS interop members may be 'external'. external int bDeviceClass; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1612:16: Error: Only JS interop members may be 'external'. external int bDeviceSubClass; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1617:16: Error: Only JS interop members may be 'external'. external int bDeviceProtocol; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1621:16: Error: Only JS interop members may be 'external'. external int bMaxPacketSize0; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1625:16: Error: Only JS interop members may be 'external'. external int idVendor; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1629:16: Error: Only JS interop members may be 'external'. external int idProduct; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1633:16: Error: Only JS interop members may be 'external'. external int bcdDevice; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1637:16: Error: Only JS interop members may be 'external'. external int iManufacturer; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1641:16: Error: Only JS interop members may be 'external'. external int iProduct; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1645:16: Error: Only JS interop members may be 'external'. external int iSerialNumber; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1649:16: Error: Only JS interop members may be 'external'. external int bNumConfigurations; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1659:16: Error: Only JS interop members may be 'external'. external int bLength; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1665:16: Error: Only JS interop members may be 'external'. external int bDescriptorType; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1671:16: Error: Only JS interop members may be 'external'. external int bEndpointAddress; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1680:16: Error: Only JS interop members may be 'external'. external int bmAttributes; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1684:16: Error: Only JS interop members may be 'external'. external int wMaxPacketSize; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1688:16: Error: Only JS interop members may be 'external'. external int bInterval; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1693:16: Error: Only JS interop members may be 'external'. external int bRefresh; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1697:16: Error: Only JS interop members may be 'external'. external int bSynchAddress; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1701:35: Error: Only JS interop members may be 'external'. external ffi.Pointer<ffi.Uint8> extra; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1705:16: Error: Only JS interop members may be 'external'. external int extra_length; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1715:16: Error: Only JS interop members may be 'external'. external int bLength; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1721:16: Error: Only JS interop members may be 'external'. external int bDescriptorType; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1725:16: Error: Only JS interop members may be 'external'. external int bInterfaceNumber; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1729:16: Error: Only JS interop members may be 'external'. external int bAlternateSetting; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1734:16: Error: Only JS interop members may be 'external'. external int bNumEndpoints; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1738:16: Error: Only JS interop members may be 'external'. external int bInterfaceClass; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1743:16: Error: Only JS interop members may be 'external'. external int bInterfaceSubClass; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1748:16: Error: Only JS interop members may be 'external'. external int bInterfaceProtocol; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1752:16: Error: Only JS interop members may be 'external'. external int iInterface; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1756:52: Error: Only JS interop members may be 'external'. external ffi.Pointer<libusb_endpoint_descriptor> endpoint; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1760:35: Error: Only JS interop members may be 'external'. external ffi.Pointer<ffi.Uint8> extra; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1764:16: Error: Only JS interop members may be 'external'. external int extra_length; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1772:53: Error: Only JS interop members may be 'external'. external ffi.Pointer<libusb_interface_descriptor> altsetting; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1777:16: Error: Only JS interop members may be 'external'. external int num_altsetting; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1787:16: Error: Only JS interop members may be 'external'. external int bLength; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1793:16: Error: Only JS interop members may be 'external'. external int bDescriptorType; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1797:16: Error: Only JS interop members may be 'external'. external int wTotalLength; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1801:16: Error: Only JS interop members may be 'external'. external int bNumInterfaces; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1805:16: Error: Only JS interop members may be 'external'. external int bConfigurationValue; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1809:16: Error: Only JS interop members may be 'external'. external int iConfiguration; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1813:16: Error: Only JS interop members may be 'external'. external int bmAttributes; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1820:16: Error: Only JS interop members may be 'external'. external int MaxPower; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1824:42: Error: Only JS interop members may be 'external'. external ffi.Pointer<libusb_interface> interface_1; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1828:35: Error: Only JS interop members may be 'external'. external ffi.Pointer<ffi.Uint8> extra; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1832:16: Error: Only JS interop members may be 'external'. external int extra_length; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1843:16: Error: Only JS interop members may be 'external'. external int bLength; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1849:16: Error: Only JS interop members may be 'external'. external int bDescriptorType; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1854:16: Error: Only JS interop members may be 'external'. external int bMaxBurst; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1861:16: Error: Only JS interop members may be 'external'. external int bmAttributes; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1866:16: Error: Only JS interop members may be 'external'. external int wBytesPerInterval; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1888:16: Error: Only JS interop members may be 'external'. external int bLength; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1894:16: Error: Only JS interop members may be 'external'. external int bDescriptorType; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1900:16: Error: Only JS interop members may be 'external'. external int bDevCapabilityType; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1907:16: Error: Only JS interop members may be 'external'. external int bmAttributes; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1917:16: Error: Only JS interop members may be 'external'. external int bLength; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1923:16: Error: Only JS interop members may be 'external'. external int bDescriptorType; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1929:16: Error: Only JS interop members may be 'external'. external int bDevCapabilityType; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1936:16: Error: Only JS interop members may be 'external'. external int bmAttributes; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1941:16: Error: Only JS interop members may be 'external'. external int wSpeedSupported; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1948:16: Error: Only JS interop members may be 'external'. external int bFunctionalitySupport; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1952:16: Error: Only JS interop members may be 'external'. external int bU1DevExitLat; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1956:16: Error: Only JS interop members may be 'external'. external int bU2DevExitLat; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1973:16: Error: Only JS interop members may be 'external'. external int bmRequestType; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1981:16: Error: Only JS interop members may be 'external'. external int bRequest; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1985:16: Error: Only JS interop members may be 'external'. external int wValue; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1990:16: Error: Only JS interop members may be 'external'. external int wIndex; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:1994:16: Error: Only JS interop members may be 'external'. external int wLength; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2008:16: Error: Only JS interop members may be 'external'. external int major; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2012:16: Error: Only JS interop members may be 'external'. external int minor; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2016:16: Error: Only JS interop members may be 'external'. external int micro; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2020:16: Error: Only JS interop members may be 'external'. external int nano; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2023:34: Error: Only JS interop members may be 'external'. external ffi.Pointer<ffi.Int8> rc; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2026:34: Error: Only JS interop members may be 'external'. external ffi.Pointer<ffi.Int8> describe; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2227:16: Error: Only JS interop members may be 'external'. external int length; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2231:16: Error: Only JS interop members may be 'external'. external int actual_length; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2235:16: Error: Only JS interop members may be 'external'. external int status; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2295:16: Error: Only JS interop members may be 'external'. external int tv_sec; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2298:16: Error: Only JS interop members may be 'external'. external int tv_usec; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2306:16: Error: Only JS interop members may be 'external'. external int fd; ^ /C:/Users/Jack%20Selvam/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/libus b-0.3.23-nullsafety.0/lib/libusb64.dart:2313:16: Error: Only JS interop members may be 'external'. external int events; ^ Error: Compilation failed.

    opened by selvam920 10
  • Linux Desktop platform initialisation error launching debug due to null safety (QuickUsbPlatform Interface)

    Linux Desktop platform initialisation error launching debug due to null safety (QuickUsbPlatform Interface)

    Using "develop" branch (which includes updated FFI 1.0.0) within Flutter Desktop Linux, the following error occurs:

    Launching lib/main.dart on Linux in debug mode... ERROR: ../../../../.pub-cache/git/quick_usb-9db68d8c68560526baacc373f9db87f37dd7efcf/lib/src/quick_usb_platform_interface.dart:11:27: Error: Field '_instance' should be initialized because its type 'QuickUsbPlatform' doesn't allow null. ERROR: - 'QuickUsbPlatform' is from 'package:quick_usb/src/quick_usb_platform_interface.dart' ('../../../../.pub-cache/git/quick_usb-9db68d8c68560526baacc373f9db87f37dd7efcf/lib/src/quick_usb_platform_interface.dart'). ERROR: static QuickUsbPlatform _instance; ERROR: ^^^^^^^^^ ERROR: ../../../../.pub-cache/git/quick_usb-9db68d8c68560526baacc373f9db87f37dd7efcf/lib/src/quick_usb_android.dart:24:9: Error: A value of type 'List<Map<dynamic, dynamic>>?' can't be assigned to a variable of type 'List<Map<dynamic, dynamic>>' because 'List<Map<dynamic, dynamic>>?' is nullable and 'List<Map<dynamic, dynamic>>' isn't. ERROR: - 'List' is from 'dart:core'. ERROR: - 'Map' is from 'dart:core'. ERROR: await _channel.invokeListMethod('getDeviceList'); ERROR: ^ ERROR: ../../../../.pub-cache/git/quick_usb-9db68d8c68560526baacc373f9db87f37dd7efcf/lib/src/quick_usb_android.dart:30:21: Error: A value of type 'Future' can't be returned from a function with return type 'Future'. ERROR: - 'Future' is from 'dart:async'. ERROR: return _channel.invokeMethod('hasPermission', usbDevice.toMap()); ERROR: ^ ERROR: ../../../../.pub-cache/git/quick_usb-9db68d8c68560526baacc373f9db87f37dd7efcf/lib/src/quick_usb_android.dart:40:21: Error: A value of type 'Future' can't be returned from a function with return type 'Future'. ERROR: - 'Future' is from 'dart:async'. ERROR: return _channel.invokeMethod('openDevice', usbDevice.toMap());

    ERROR: ^ ERROR: ../../../../.pub-cache/git/quick_usb-9db68d8c68560526baacc373f9db87f37dd7efcf/lib/src/quick_usb_android.dart:58:21: Error: A value of type 'Future' can't be returned from a function with return type 'Future'. ERROR: - 'Future' is from 'dart:async'. ERROR: return _channel.invokeMethod('setConfiguration', config.toMap()); ERROR: ^ ERROR: ../../../../.pub-cache/git/quick_usb-9db68d8c68560526baacc373f9db87f37dd7efcf/lib/src/quick_usb_android.dart:63:21: Error: A value of type 'Future' can't be returned from a function with return type 'Future'. ERROR: - 'Future' is from 'dart:async'. ERROR: return _channel.invokeMethod('claimInterface', intf.toMap()); ERROR: ^ ERROR: ../../../../.pub-cache/git/quick_usb-9db68d8c68560526baacc373f9db87f37dd7efcf/lib/src/quick_usb_android.dart:68:21: Error: A value of type 'Future' can't be returned from a function with return type 'Future'. ERROR: - 'Future' is from 'dart:async'. ERROR: return _channel.invokeMethod('releaseInterface', intf.toMap()); ERROR: ^ ERROR: ../../../../.pub-cache/git/quick_usb-9db68d8c68560526baacc373f9db87f37dd7efcf/lib/src/quick_usb_android.dart:88:21: Error: A value of type 'Future' can't be returned from a function with return type 'Future'. ERROR: - 'Future' is from 'dart:async'. ERROR: return _channel.invokeMethod('bulkTransferOut', { ERROR: ^

    Exception: Build process failed Exited (sigterm)

    opened by digitalkirkley 10
  • Communication with USB

    Communication with USB

    Hello, I need to send and receive data via USB. I'm trying to use the bulkTransferIn part, but how do I send the data? Where should I write the data I will send?

    opened by kalimero-plt 9
  • Not working on MacOS

    Not working on MacOS

    Hi, I'm running MacOS 10.15, stable channel of latest flutter & dart.

    No errors on my flutter doctor.

    I get the following when I try to run the example.

    I tried to look for my libusb location, and it's different from what the warning says.

    How can I change the path where it looks for the library? Or what should I do in order to fix this?

    Screen Shot 2021-07-05 at 5 35 55 PM
    opened by MateoSegura 9
  • platformException issue facing only on android 12

    platformException issue facing only on android 12

    [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(error, com.example.flutter_usb_check: Targeting S+ (version 31 and above) requires that 
    one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
    E/flutter (11462): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles., null, java.lang.IllegalArgumentException: com.example.flutter_usb_check: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified 
    when creating a PendingIntent.
    E/flutter (11462): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
    E/flutter (11462):      at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
    E/flutter (11462):      at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
    E/flutter (11462):      at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
    E/flutter (11462):      at com.example.quick_usb.QuickUsbPluginKt.pendingPermissionIntent(QuickUsbPlugin.kt:18)
    E/flutter (11462):      at com.example.quick_usb.QuickUsbPluginKt.access$pendingPermissionIntent(QuickUsbPlugin.kt:1)
    E/flutter (11462):      at com.example.quick_usb.QuickUsbPlugin.onMethodCall(QuickUsbPlugin.kt:85)
    E/flutter (11462):      at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
    E/flutter (11462):      at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:296)
    E/flutter (11462):      at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:320)
    E/flutter (11462):      at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$TsixYUB5E6FpKhMtCSQVHKE89gQ.run(Unknown Source:12)
    E/flutter (11462):      at android.os.Handler.handleCallback(Handler.java:938)
    E/flutter (11462):      at android.os.Handler.dispatchMessage(Handler.java:99)
    E/flutter (11462):      at android.os.Looper.loopOnce(Looper.java:233)
    E/flutter (11462):      at android.os.Looper.loop(Looper.java:334)
    E/flutter (11462):      at android.app.ActivityThread.main(ActivityThread.java:8396)
    E/flutter (11462):      at java.lang.reflect.Method.invoke(Native Method)
    E/flutter (11462):      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:582)
    E/flutter (11462):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068)
    E/flutter (11462): )
    E/flutter (11462): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
    E/flutter (11462): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18)
    E/flutter (11462): <asynchronous suspension>
    E/flutter (11462): #2      _MyAppState._has_request.<anonymous closure> (package:flutter_usb_check/main.dart:109:13)
    E/flutter (11462): <asynchronous suspension>
    E/flutter (11462):
    
    opened by vishalideastoimpact 8
  • [Feature Request] Would you consider adding Null Safety and iOS/iPadOS support?

    [Feature Request] Would you consider adding Null Safety and iOS/iPadOS support?

    @Sunbreak hi there, since you have worked on the desktop release as well as MacOS I wanted to know whether you will continue your work on completing the package to support both null safety and add support for iOS?

    opened by AriaShishegaran 7
  • Cannot run bulkTransferIn on Android properly

    Cannot run bulkTransferIn on Android properly

    Im going to use this package in an app that is running both on Android and Linux. I modified the example app little bit and used it for Android but I have faced with an error that I haven't been able to find any solution.

    modified example app

    From the example app, I go over as

    1. init
    2. getDeviceList
    3. hasPermission
    4. requestPermission
    5. openDevice
    6. getConfiguration
    7. claimInterface
    8. bulkTransferIn

    Everything seems alright until I start reading data at step 8.

    The error:

    E/MethodChannel#quick_usb(26400): Failed to handle method call
    E/MethodChannel#quick_usb(26400): java.lang.IllegalArgumentException: Requested element count -1 is less than zero.
    E/MethodChannel#quick_usb(26400): 	at kotlin.collections.ArraysKt___ArraysKt.take(_Arrays.kt:4783)
    E/MethodChannel#quick_usb(26400): 	at com.example.quick_usb.QuickUsbPlugin.onMethodCall(QuickUsbPlugin.kt:141)
    E/MethodChannel#quick_usb(26400): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
    E/MethodChannel#quick_usb(26400): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:296)
    E/MethodChannel#quick_usb(26400): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:320)
    E/MethodChannel#quick_usb(26400): 	at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$TsixYUB5E6FpKhMtCSQVHKE89gQ.run(Unknown Source:12)
    E/MethodChannel#quick_usb(26400): 	at android.os.Handler.handleCallback(Handler.java:938)
    E/MethodChannel#quick_usb(26400): 	at android.os.Handler.dispatchMessage(Handler.java:99)
    E/MethodChannel#quick_usb(26400): 	at android.os.Looper.loop(Looper.java:247)
    E/MethodChannel#quick_usb(26400): 	at android.app.ActivityThread.main(ActivityThread.java:8676)
    E/MethodChannel#quick_usb(26400): 	at java.lang.reflect.Method.invoke(Native Method)
    E/MethodChannel#quick_usb(26400): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
    E/MethodChannel#quick_usb(26400): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
    E/flutter (26400): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(error, Requested element count -1 is less than zero., null, java.lang.IllegalArgumentException: Requested element count -1 is less than zero.
    E/flutter (26400): 	at kotlin.collections.ArraysKt___ArraysKt.take(_Arrays.kt:4783)
    E/flutter (26400): 	at com.example.quick_usb.QuickUsbPlugin.onMethodCall(QuickUsbPlugin.kt:141)
    E/flutter (26400): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
    E/flutter (26400): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:296)
    E/flutter (26400): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger(DartMessenger.java:320)
    E/flutter (26400): 	at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$TsixYUB5E6FpKhMtCSQVHKE89gQ.run(Unknown Source:12)
    E/flutter (26400): 	at android.os.Handler.handleCallback(Handler.java:938)
    E/flutter (26400): 	at android.os.Handler.dispatchMessage(Handler.java:99)
    E/flutter (26400): 	at android.os.Looper.loop(Looper.java:247)
    E/flutter (26400): 	at android.app.ActivityThread.main(ActivityThread.java:8676)
    E/flutter (26400): 	at java.lang.reflect.Method.invoke(Native Method)
    E/flutter (26400): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
    E/flutter (26400): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
    E/flutter (26400): )
    E/flutter (26400): #0      StandardMethodCodec.decodeEnvelope
    E/flutter (26400): #1      MethodChannel._invokeMethod
    E/flutter (26400): <asynchronous suspension>
    E/flutter (26400): #2      QuickUsbAndroid.bulkTransferIn
    E/flutter (26400): <asynchronous suspension>
    E/flutter (26400): #3      _MyAppState._bulkTransfer.<anonymous closure>
    E/flutter (26400): <asynchronous suspension>
    E/flutter (26400):
    

    Interestingly, when I use bulkTransferOut, I get the correct output: I/flutter (26400): bulkTransferOut 2

    opened by serkankavak 6
  • UsbDevice manufacturer, product & serial number description

    UsbDevice manufacturer, product & serial number description

    Currently there is no way to present human friendly list of devices for user to select (IE. select pos printer). I added 2 new functions to get human friendly info about UsbDevice.

    getDeviceDescription returns new object of UsbDeviceDescription type with manufacturer, product & serial number info. getDevicesWithDescription returns list of UsbDeviceDescription type with manufacturer, product & serial number info.

    All devices/handles are opened/closed automatically. Default device handle is neither populated or used since this opens and closes multiple devices. Existing object model and api is left as is.

    See https://github.com/woodemi/quick_usb/issues/21

    opened by shaxxx 5
  • How to keep reading data constantly?

    How to keep reading data constantly?

    In my case, data is inputted erratically through the serial port to my android device, thus the bulkTransferIn function doesn't really suite my purpose. Plugins like usb_serial let you specify a function to be run whenever the android device receives any data through the serial device. Should I run the bulkTransferIn function on a loop or is there a better way to achieve my purpose using this plugin?

    opened by Zopenzop 5
  • Multiple instance feature

    Multiple instance feature

    Quick_Usb is now a singleton which means can only open one device for the same time. While there exists scenarios that need to concurrently communicate with multiple usb devices.

    Is it possible? Is there any plan to support this feature?

    opened by delphi007 2
  • Cannot operate multiple serial ports at the same time, which is a flaw

    Cannot operate multiple serial ports at the same time, which is a flaw

    It's really a great library, let me make a small suggestion.

    Some operations should be based on a customizable device that is already open

    Of course it doesn't affect the use, but it would be better to optimize it.

    opened by tenutos 1
Owner
Woodemi Co., Ltd
Woodemi Co., Ltd
A cross-platform (Windows/macOS) scanner plugin for Flutter

quick_scanner A cross-platform (Windows/macOS) scanner plugin for Flutter Usage QuickScanner.startWatch(); var _scanners = await QuickScanner.getScan

Woodemi Co., Ltd 5 Jun 10, 2022
Flutter plugin for Flutter desktop(macOS/Linux/Windows) to change window size.

desktop_window Flutter plugin for Flutter desktop(macOS/Linux/Windows) to change window size. Usage import 'package:desktop_window/desktop_window.dart

ChunKoo Park 72 Dec 2, 2022
🎡 A cross-platform media playback library for C/C++ with good number of features (only Windows & Linux).

libwinmedia A cross-platform media playback library for C/C++ & Flutter with good number of features. Example A very simple example can be as follows.

Harmonoid 38 Nov 2, 2022
Flutter on Windows, MacOS and Linux - based on Flutter Embedding, Go and GLFW.

go-flutter - A package that brings Flutter to the desktop Purpose Flutter allows you to build beautiful native apps on iOS and Android from a single c

null 5.5k Jan 6, 2023
🎞 Flutter media playback, broadcast & recording library for Windows, Linux & macOS. Written in C++ using libVLC & libVLC++. (Both audio & video)

dart_vlc Flutter media playback, broadcast, recording & chromecast library for Windows, Linux & macOS. Written in C++ using libVLC & libVLC++. Install

Hitesh Kumar Saini 417 Dec 29, 2022
A simple-to-use flutter update package for Windows, MacOS, and Linux.

Updat - The simple-to-use, flutter-based desktop update package Updat is a simple-to-use reliable flutter-native updater that handles your application

Eduardo M. 14 Dec 21, 2022
File picker plugin for Flutter, compatible with mobile (iOS & Android), Web, Desktop (Mac, Linux, Windows) platforms with Flutter Go support.

A package that allows you to use the native file explorer to pick single or multiple files, with extensions filtering support.

Miguel Ruivo 987 Jan 6, 2023
A Flutter plugin to read πŸ”– metadata of 🎡 media files. Supports Windows, Linux & Android.

flutter_media_metadata A Flutter plugin to read metadata of media files. A part of Harmonoid open source project ?? Install Add in your pubspec.yaml.

Harmonoid 60 Dec 2, 2022
TinyPNG4Flutter - A TinyPNG Compress Image Desktop GUI For Flutter. Support macOS and windows

TinyPNG4Flutter A TinyPNG Compress Image Desktop GUI For Flutter. Support macOS

ι€Έι£Ž 20 Dec 8, 2022
Flutter library for window blur & transparency effects for on Windows & Linux. πŸ’™

flutter_acrylic Window blur & transparency effects for Flutter on Windows & Linux Installation Mention in your pubspec.yaml. dependencies: ... flu

Hitesh Kumar Saini 437 Dec 31, 2022
An 🎡 audio playback library for Flutter Desktop. Supports Windows & Linux. Based on miniaudio.

βœ’ libwinmedia is sequel to this project. It provides network playback, better format support, control & features. An audio playback library for Flutte

Hitesh Kumar Saini 50 Oct 31, 2022
A pure Dart implementation of Firebase with initial support aimed at FlutterFire for Linux & Windows.

FlutterFire Desktop A work in progress pure Dart implementation of Firebase with initial support aimed at FlutterFire for Linux & Windows. A FlutterFi

Invertase 293 Jan 4, 2023
A cross-platform flutter plugin for C/C++/ObjC crash report via Google Breakpad

quick_breakpad A cross-platform flutter plugin for C/C++/ObjC crash report via Google Breakpad Use breakpad for quick_breakpad_example $CLI_BREAKPAD i

Woodemi Co., Ltd 16 Jul 30, 2022
A macOS plugin which can register a callback for a global keyboard shortcut.

global_shortcuts A macOS plugin which can register a callback for a global keyboard shortcut. As the shortcut is global, the callback will be triggere

James Leahy 7 Jan 2, 2023
A clean front-end plugin to Volumio, the Linux distribution for music playback. Volumio Touch Display Lite is written in Flutter and runs on flutter-pi.

EN | δΈ­ζ–‡ Touch Display Lite plugin for Volumio 3 Feng Zhou, 2021-12 Touch Display Lite is a clean and fast user interface for Volumio 3, the Linux dist

Feng Zhou 5 Jul 26, 2022
A Cross Platform Piano made with Flutter

flutter_piano A Crossplatform Midi Piano built with Flutter.dev This application runs on both iOS and Android. This runs a custom crossplatform midi s

Rody Davis 381 Jan 3, 2023
Photon is a cross-platform file-sharing application built using flutter.

Welcome to Photon ?? Photon is a cross-platform file-transfer application built using flutter. It uses http to transfer files between devices.You can

Abhilash Hegde 161 Jan 1, 2023
Sharik is an open-source, cross-platform solution for sharing files via Wi-Fi or Mobile Hotspot

Share files across devices with Sharik! It works with Wi-Fi connection or Tethering (Wi-Fi Hotspot). No internet connection needed. Contributing Feel

Mark Motliuk 842 Dec 30, 2022
Flutter widgets and themes implementing the current macOS design language.

macos_ui Flutter widgets and themes implementing the current macOS design language. NOTE: This package depends on the excellent native_context_menu pl

Reuben Turner 1.1k Jan 1, 2023