{"id":13785019,"url":"https://github.com/woodemi/quick_usb","last_synced_at":"2025-12-25T06:36:05.388Z","repository":{"id":37067561,"uuid":"335856175","full_name":"woodemi/quick_usb","owner":"woodemi","description":"A cross-platform (Android/Windows/macOS/Linux) USB plugin for Flutter","archived":false,"fork":false,"pushed_at":"2022-06-20T00:07:55.000Z","size":350,"stargazers_count":43,"open_issues_count":6,"forks_count":30,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-17T21:39:14.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/woodemi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-04T06:09:29.000Z","updated_at":"2024-10-16T15:10:45.000Z","dependencies_parsed_at":"2022-06-24T21:40:48.551Z","dependency_job_id":null,"html_url":"https://github.com/woodemi/quick_usb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodemi%2Fquick_usb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodemi%2Fquick_usb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodemi%2Fquick_usb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/woodemi%2Fquick_usb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/woodemi","download_url":"https://codeload.github.com/woodemi/quick_usb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253632045,"owners_count":21939370,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T19:00:55.260Z","updated_at":"2025-12-25T06:36:00.334Z","avatar_url":"https://github.com/woodemi.png","language":"Dart","readme":"# DEPRECATED\n\nThis repo is deprecated; please use the new mono repo https://github.com/woodemi/quick.flutter\n\n# quick_usb\n\nA cross-platform (Android/Windows/macOS/Linux) USB plugin for Flutter\n\n## Usage\n\n- [List devices](#list-devices)\n- [List devices with additional description](#list-devices-with-additional-description)\n- [Get device description](#get-device-description)\n- [Check/Request permission](#checkrequest-permission)\n- [Open/Close device](#openclose-device)\n- [Get/Set configuration](#getset-configuration)\n- [Claim/Release interface](#claimrelease-interface)\n- [Bulk transfer in/out](#bulk-transfer-inout)\n- [Set auto detach kernel driver](#set-auto-detach-kernel-driver)\n\n### List devices\n\n```dart\nawait QuickUsb.init();\n// ...\nvar deviceList = await QuickUsb.getDeviceList();\n// ...\nawait QuickUsb.exit();\n```\n\n### List devices with additional description\n\nReturns devices list with manufacturer, product and serial number description.\n\nAny of these attributes can be null.\n\n```dart\nvar descriptions = await QuickUsb.getDevicesWithDescription();\nvar deviceList = descriptions.map((e) =\u003e e.device).toList();\nprint('descriptions $descriptions');\n```\n\n**(Android Only)** Android requires permission for each device in order to get the serial number. The user will be asked\nfor permission for each device if needed. If you do not require the serial number, you can avoid requesting permission using:\n```dart\nvar descriptions = await QuickUsb.getDevicesWithDescription(requestPermission: false);\n```\n\n### Get device description\n\nReturns manufacturer, product and serial number description for specified device.\n\nAny of these attributes can be null.\n\n```dart\n var description = await QuickUsb.getDeviceDescription(device);\n print('description ${description.toMap()}');\n```\n\n**(Android Only)** Android requires permission for each device in order to get the serial number. The user will be asked\nfor permission for each device if needed. If you do not require the serial number, you can avoid requesting permission using:\n```dart\nvar description = await QuickUsb.getDeviceDescription(requestPermission: false);\n```\n\n### Check/Request permission\n\n_**Android Only**_\n\n```dart\nvar hasPermission = await QuickUsb.hasPermission(device);\nprint('hasPermission $hasPermission');\n// ...\nawait QuickUsb.requestPermission(device);\n```\n\n### Open/Close device\n\n```dart\nvar openDevice = await QuickUsb.openDevice(device);\nprint('openDevice $openDevice');\n// ...\nawait QuickUsb.closeDevice();\n```\n\n### Get/Set configuration\n\n```dart\nvar configuration = await QuickUsb.getConfiguration(index);\nprint('getConfiguration $configuration');\n// ...\nvar setConfiguration = await QuickUsb.setConfiguration(configuration);\nprint('setConfiguration $getConfiguration');\n```\n\n### Claim/Release interface\n\n```dart\nvar claimInterface = await QuickUsb.claimInterface(interface);\nprint('claimInterface $claimInterface');\n// ...\nvar releaseInterface = await QuickUsb.releaseInterface(interface);\nprint('releaseInterface $releaseInterface');\n```\n\n### Bulk transfer in/out\n\n```dart\nvar bulkTransferIn = await QuickUsb.bulkTransferIn(endpoint, 1024, timeout: 2000);\nprint('bulkTransferIn ${hex.encode(bulkTransferIn)}');\n// ...\nvar bulkTransferOut = await QuickUsb.bulkTransferOut(endpoint, data, timeout: 2000);\nprint('bulkTransferOut $bulkTransferOut');\n```\n\n### Set auto detach kernel driver\n\nEnable/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.\n\nAutomatic kernel driver detachment is disabled on newly opened device handles by default.\n\nThis is supported only on linux, on other platforms this function does nothing.\n\n```dart\nawait QuickUsb.setAutoDetachKernelDriver(true);\n```\n","funding_links":[],"categories":["Packages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoodemi%2Fquick_usb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwoodemi%2Fquick_usb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwoodemi%2Fquick_usb/lists"}