FlutterUsbWrite class
Constructors
-
FlutterUsbWrite()
-
Initializes the plugin and starts listening for potential platform events.
factory
-
FlutterUsbWrite.private(MethodChannel? _methodChannel, EventChannel? _eventChannel)
-
This constructor is only used for testing and shouldn't be accessed by
users of the plugin. It may break or change at any time.
Methods
-
close()
→ Future
-
Close USB connection
-
controlTransfer(int requestType, int request, int value, int index, Uint8List? buffer, int length, int timeout)
→ Future<int?>
-
Optionally set transfer control.
Since this plugin supports only sending data to device, only Device-To-Host
[requestType]
makes sense.
-
listDevices()
→ Future<List<UsbDevice>>
-
Returns a list of UsbDevices currently plugged in.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
open({int? deviceId, int? vendorId, int? productId})
→ Future<UsbDevice>
-
Opens connection to device with specified deviceId, or with specified VendorId and ProductId
-
toString()
→ String
-
A string representation of this object.
inherited
-
write(Uint8List bytes)
→ Future<bool?>
-
Sends raw bytes to USB device.
Requires open connection to USB device.