UsbDevice class

Constructors

UsbDevice()
Constructs a singleton instance of UsbDeviceService.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
pairedDevices Future<List>
Get paired devices
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

claimInterface(dynamic device, int interfaceNumber) Future
Claims the interface of the device
clearHalt(dynamic device, String direction, int endpointNumber) Future
close(dynamic device) Future
close session with the device
controlTransferIn(dynamic device, SetupParam setup, {int? length}) Future<USBInTransferResult>
Waits for a specified control transfer from the device
controlTransferOut(dynamic device, SetupParam setup, {dynamic data}) Future<USBOutTransferResult>
Sends a specified control transfer to the device
getAvailableConfigurations(dynamic pairedDevice) Future<List<USBConfiguration>>
Get available configuration in device
getPairedDeviceInfo(dynamic pairedDevice) Future<USBDeviceInfo>
get device's info like productId, vendorId, USB version etc..
getSelectedConfiguration(dynamic pairedDevice) Future<USBConfiguration?>
get selected configuration of paired device
isochronousTransferIn(dynamic device, dynamic endpointNumber, List<int> packetLengths) Future<USBIsochronousInTransferResult>
isochronousTransferOut(dynamic device, dynamic endpointNumber, ByteBuffer data) Future<USBIsochronousOutTransferResult>
isSupported() Future<bool>
Return true if web usb supported
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(dynamic device) Future
Start session with the device
releaseInterface(dynamic device, int interfaceNumber) Future
Release interface
requestDevices(List<DeviceFilter> filters) Future
Pair a device
reset(dynamic device) Future
Reset device
selectConfiguration(dynamic device, int configurationValue) Future
Select the configuration of the device.
setOnConnectionCallback(dynamic onConnect(dynamic)) Future<void>
set on connect function callback
setOnDisconnectCallback(dynamic onDisconnect(dynamic)) Future<void>
Set on disconnect function callback
toString() String
A string representation of this object.
inherited
transferIn(dynamic device, int endpointNumber, int length) Future<USBInTransferResult>
get data from usb device
transferOut(dynamic device, dynamic endpointNumber, ByteBuffer data) Future<USBOutTransferResult>
send data to usb

Operators

operator ==(Object other) bool
The equality operator.
inherited