UsbDevicePlatform class Null safety

Inheritance
Implementers

Constructors

UsbDevicePlatform()
Constructs a UsbDevicePlatform.

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
pairedDevices Future<List>
Returns usb devices
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

claimInterface(dynamic device, int interfaceNumber) Future
Claims the interface of the device (by the number specified in configuration.interfaces)
clearHalt(dynamic device, String direction, int endpointNumber) Future
Returns a Future that resolves when a halt condition is cleared.
close(dynamic device) Future
Returns a Future that resolves when all open interfaces are released and the device session has ended.
controlTransferIn(dynamic device, SetupParam setup, {int? length}) Future<USBInTransferResult>
Waits for a specified control transfer from the device. Returns a Future resolved with the transfer data and status.
controlTransferOut(dynamic device, SetupParam setup, {dynamic data}) Future<USBOutTransferResult>
Sends a specified control transfer to the device. Returns the Future resolved with the transfer status and the number of bytes written
getAvailableConfigurations(dynamic pairedDevice) Future<List<USBConfiguration>>
Return a list of available configuration to be selected
getPairedDeviceInfo(dynamic pairedDevice) Future<USBDeviceInfo>
Return a map of paired device's info
getSelectedConfiguration(dynamic pairedDevice) Future<USBConfiguration?>
isochronousTransferIn(dynamic device, int endpointNumber, List<int> packetLengths) Future<USBIsochronousInTransferResult>
Returns a Future that resolves when time sensitive information has been transmitted to the USB device.
isochronousTransferOut(dynamic device, int endpointNumber, dynamic data) Future<USBIsochronousOutTransferResult>
Returns a Future that resolves when time sensitive information has been transmitted from the USB device.
isSupported() Future<bool>
Returns true if web usb is supported
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
open(dynamic device) Future
Returns a Future that resolves when a device session has started.
releaseInterface(dynamic device, int interfaceNumber) Future
Returns a Future that resolves when a claimed interface is released from exclusive access
requestDevices(List<DeviceFilter> filters) Future
Returns a Future with the device object that matches the specified filter by predefined vendor ID, product ID, class or subclass code, protocol code or serial number.
reset(dynamic device) Future
Returns a Future that resolves when the device is reset and all app operations canceled and their promises rejected
selectConfiguration(dynamic device, int configurationValue) Future
Select the configuration of the device. Returns a Future resolved when the setup has been applied.
setOnConnectCallback(dynamic onConnect(dynamic)) Future<void>
Set functions to get a callback when the paired device is connect
setOnDisconnectCallback(dynamic onDisconnect(dynamic)) Future<void>
Set functions to get a callback when the paired device is disconnect
toString() String
A string representation of this object. [...]
inherited
transferIn(dynamic device, int endpointNumber, int length) Future<USBInTransferResult>
Waits for a bulk or interrupt transfer from the device on a specified endpoint. Returns the Future resolved with the transfer data and status.
transferOut(dynamic device, int endpointNumber, dynamic data) Future<USBOutTransferResult>
Sends a bulk or interrupt transfer to the specified endpoint of the device. Returns the Future resolved with the transfer status and the number of bytes written.

Operators

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

Static Properties

instance UsbDevicePlatform
The default instance of UsbDevicePlatform to use. [...]
read / write