XPrinterPckPlatform class abstract
The interface that implementations of x_printer_pck must implement.
- Inheritance
-
- Object
- PlatformInterface
- XPrinterPckPlatform
- Implementers
Constructors
- XPrinterPckPlatform.new()
- Constructs a XPrinterPckPlatform.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
connectDevice(
int index) → Future< bool> - Connect to a device by index in the scan results.
-
disconnectDevice(
) → Future< bool> - Disconnect from the current device.
-
getPrinterStatus(
) → Future< Map< String, dynamic> > - Get printer status.
-
initialize(
) → Future< void> - Initialize the printer plugin.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
printBarcode(
String content, {int x = 100, int y = 50, int height = 80, String type = '128'}) → Future< bool> - Print barcode.
-
printImage(
Uint8List imageData, {int commandType = 0, int? printerWidth, int? printerHeight, int rotation = 0, double scale = 0.9}) → Future< bool> - Print image.
-
printPDF(
String pdfPath, {int commandType = 0, int? printerWidth, int? printerHeight, int rotation = 0, double scale = 0.9, int? startPage, int? endPage, String? password}) → Future< bool> -
printQRCode(
String content, {int x = 280, int y = 10, int cellWidth = 8}) → Future< bool> - Print QR code.
-
printText(
String text, {int fontSize = 1}) → Future< bool> - Print text.
-
registerConnectionChangedHandler(
dynamic handler(Map< String, dynamic> )) → void - Register connection status change handler.
-
registerScanResultsHandler(
dynamic handler(List< Map< )) → voidString, dynamic> > - Register scan results handler.
-
scanDevices(
) → Future< bool> - Start scanning for Bluetooth devices.
-
stopScan(
) → Future< bool> - Stop scanning for Bluetooth devices.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ XPrinterPckPlatform
-
The default instance of XPrinterPckPlatform to use.
Defaults to MethodChannelXPrinterPck.
getter/setter pair