AndroidUsbPrinterPlatform class abstract

Inheritance
  • Object
  • PlatformInterface
  • AndroidUsbPrinterPlatform

Constructors

AndroidUsbPrinterPlatform()
Constructs a AndroidUsbPrinterPlatform.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
usbPlugInfoStream Stream<UsbPlugInfo>
no setter

Methods

checkDeviceConn(UsbDeviceInfo usbDeviceInfo) Future<bool>
获取打印机连接状态
checkDevicePermission(UsbDeviceInfo usbDeviceInfo) Future<bool>
获取打印机设备权限
connect(UsbDeviceInfo usbDeviceInfo) Future<bool>
打印机连接
disconnect(UsbDeviceInfo usbDeviceInfo) Future<bool>
打印机断开连接
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryLocalUsbDevice() Future<List<UsbDeviceInfo>>
获取本地打印机列表
readBytes(UsbDeviceInfo usbDeviceInfo, {int timeOut = 2000}) Future<Uint8List?>
接收打印机字节数据
removeUsbConnCache(UsbDeviceInfo usbDeviceInfo) Future
删除原生层中 usb conn 缓存(删除设备时可调用)
requestDevicePermission(UsbDeviceInfo usbDeviceInfo) Future<bool>
申请打印机设备权限
toString() String
A string representation of this object.
inherited
writeBytes(UsbDeviceInfo usbDeviceInfo, List<int> bytes, {int singleLimit = -1}) Future<int>
打印机发送字节数据

Operators

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

Static Properties

instance AndroidUsbPrinterPlatform
The default instance of AndroidUsbPrinterPlatform to use.
getter/setter pair