UsbDeviceRecord class

One USB device returned by UsbHostApi.enumerate.

Constructors

UsbDeviceRecord({required int vendorId, required int productId, required String path, required bool hasPermission, String? manufacturer, String? product, String? serialNumber, int? interfaceNumber, int? bulkInEndpoint, int? bulkOutEndpoint, int? wMaxPacketSizeOut, String? driverBinding})

Properties

bulkInEndpoint ↔ int?
Bulk IN endpoint address (with direction bit).
getter/setter pair
bulkOutEndpoint ↔ int?
Bulk OUT endpoint address.
getter/setter pair
driverBinding ↔ String?
Windows-only. One of "WINUSB", "USBPRINT", "OTHER". Null on other platforms.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
hasPermission ↔ bool
Android-relevant. True on macOS/Windows (permission model is per-app, not per-device).
getter/setter pair
interfaceNumber ↔ int?
Printer-class interface index (bInterfaceClass == 0x07). Null if no such interface exists on the device.
getter/setter pair
manufacturer ↔ String?
getter/setter pair
path ↔ String
Platform-opaque identifier used for subsequent calls. Android: /dev/bus/usb/001/004. macOS: IOKit path. Windows: \\?\USB#VID_....
getter/setter pair
product ↔ String?
getter/setter pair
productId ↔ int
Product ID.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serialNumber ↔ String?
getter/setter pair
vendorId ↔ int
Vendor ID (0x0A5F for Zebra).
getter/setter pair
wMaxPacketSizeOut ↔ int?
wMaxPacketSize of the bulk-OUT endpoint. Drives auto chunk size.
getter/setter pair

Methods

encode() → Object
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

decode(Object result) → UsbDeviceRecord