MethodChannelUsbDevice class
An implementation of UsbDevicePlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- UsbDevicePlatform
- MethodChannelUsbDevice
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel ↔ MethodChannel
-
The method channel used to interact with the native platform.
getter/setter pair
-
pairedDevices
→ Future<
List> -
Returns usb devices
no setteroverride
- 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 (by the number specified in configuration.interfaces)
override
-
clearHalt(
dynamic device, String direction, int endpointNumber) → Future -
Returns a Future that resolves when a halt condition is cleared.
override
-
close(
dynamic device) → Future -
Returns a Future that resolves when all open interfaces are released and the device session has ended.
override
-
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.
override
-
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
override
-
getAvailableConfigurations(
dynamic pairedDevice) → Future< List< USBConfiguration> > -
Return a list of available configuration to be selected
override
-
getPairedDeviceInfo(
dynamic pairedDevice) → Future< USBDeviceInfo> -
Return a map of paired device's info
override
-
getSelectedConfiguration(
dynamic pairedDevice) → Future< USBConfiguration?> -
override
-
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.
override
-
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.
override
-
isSupported(
) → Future< bool> -
Returns true if web usb is supported
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
dynamic device) → Future -
Returns a Future that resolves when a device session has started.
override
-
releaseInterface(
dynamic device, int interfaceNumber) → Future -
Returns a Future that resolves when a claimed interface is released from exclusive access
override
-
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.
override
-
reset(
dynamic device) → Future -
Returns a Future that resolves when the device is reset and all app operations canceled and their promises rejected
override
-
selectConfiguration(
dynamic device, int configurationValue) → Future -
Select the configuration of the device. Returns a Future resolved when the setup has been applied.
override
-
setOnConnectCallback(
dynamic onConnect(dynamic)) → Future< void> -
Set functions to get a callback when the paired device is connect
override
-
setOnDisconnectCallback(
dynamic onDisconnect(dynamic)) → Future< void> -
Set functions to get a callback when the paired device is disconnect
override
-
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.
override
-
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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited