write method

Future<int> write(
  1. int handle,
  2. int endpoint,
  3. List<int> bytes, {
  4. int timeoutMs = 1000,
})

Writes to an endpoint, answering how many bytes the device took.

Implementation

Future<int> write(int handle, int endpoint, List<int> bytes,
        {int timeoutMs = 1000}) async =>
    DVNativeBridge.require<int>('device.usb.write', <String, Object?>{
      'handle': handle,
      'endpoint': endpoint,
      'bytes': bytes,
      'timeoutMs': timeoutMs,
    });