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