Printer class Null safety
- Implementers
Constructors
- Printer()
Properties
- hashCode → int
- 
  The hash code for this object.
  read-only, inherited
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  read-only, inherited
Methods
- 
  connectPrinter(PrinterDevice device) → Future< bool?> 
- 
  连接打印机
device打印机设备
- 
  disconnectAllPrinter() → Future< void> 
- 断开所有连接
- 
  disconnectPrinter(PrinterDevice device) → Future< bool?> 
- 
  断开连接
device打印机设备
- 
  getConnectedPrinters({PrinterDeviceType? type}) → Future< List< PrinterDevice> ?>
- 获取当前已连接的打印机
- 
  getPrinterMode(PrinterDevice device) → Future< PrinterMode> 
- 
  获取打印机的模式(当前的打印指令集)
device打印机设备
- 
  getPrinterModel(PrinterDevice device, PrinterMode mode) → Future< String?> 
- 
  获取打印机型号
device打印机设备mode打印模式(指令类型)
- 
  getPrinterStatus(PrinterDevice device, PrinterMode mode) → Future< PrinterStatus?> 
- 
  获取打印机状态(正常、缺纸、开盖、过热等)
device打印机设备mode打印模式(指令类型)
- 
  isConnected(PrinterDevice device) → Future< bool> 
- 
  判断打印机是否已连接
device打印机设备
- 
  listenPrinterConnectState() → Stream< List< PrinterDevice> ?>
- 监听打印机连接状态
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a non-existent method or property is accessed.
  inherited
- 
  read(PrinterDevice device) → Stream< Uint8List?> 
- 
  监听打印机返回数据
device打印机设备
- 
  scanBluetoothDevice({Duration timeout = const Duration(seconds: 30)}) → Stream< BluetoothDevice> 
- 
  扫描蓝牙设备
timeout超时时间
- 
  scanTcpDevice() → Future< List< TcpDevice> ?>
- 扫描网络TCP设备
- 
  scanTtyDevice() → Future< List< TtyDevice> ?>
- 扫描串口设备
- 
  scanUsbAccessory() → Future< List< UsbAccessoryDevice> ?>
- 扫描USB设备
- 
  scanUsbDevice() → Future< List< UsbDevice> ?>
- 扫描USB设备
- 
  setLocatetionEnableStringForBluetoothScan(String title, String message) → Future< void> 
- 设置定位功能开启提示信息 安卓6到11之间,扫描蓝牙需要系统定位功能已打开,否则无法扫描 当系统定位功能未打开时,弹出提示框,并引导用户跳转到系统定位开启界面
- 
  stopScanBlueToothDevice() → Future< void> 
- 停止扫描蓝牙设备
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
- 
  write(PrinterDevice device, Uint8List data) → Future< bool?> 
- 
  发送数据到打印机
device打印机设备data数据
- 
  writeAndRead(PrinterDevice device, Uint8List data, {Duration timeout = const Duration(milliseconds: 1500)}) → Future< Uint8List?> 
- 
  发送数据到打印机,并等待打印机返回结果
device打印机设备
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited