Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

A flutter webusb plugin

WebUSB plugin

Developed with   by Apparence.io

This plugin provide access to USB devices from web pages with WebUSB.

Platform Support

AndroidiOSMacOSWebLinuxWindows

Usage

import 'package:usb_device/usb_device.dart';

final UsbDevice usbDevice = UsbDevice();

var pairedDevices = await usbDevice.pairedDevices; // get paired devices
var pairedDevice = await usbDevice.requestDevices([DeviceFilter(vendorId : 0x00, productId: 0x00)]); // par a device 
List<USBConfiguration> availableConfigurations = await usbDevice.getAvailableConfigurations(pairedDevice); // get device's configurations 
USBDeviceInfo deviceInfo = await usbDevice.getPairedDeviceInfo(pairedDevice); // get device's info
await usbDevice.open(pairedDevice); // start session
await usbDevice.close(pairedDevice); // close session

Implementation

USB

USBDevice

Events

Download WebUSB plugin source code on GitHub

Exit mobile version