MethodChannelXPrinterPck class
An implementation of XPrinterPckPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- XPrinterPckPlatform
- MethodChannelXPrinterPck
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
final
- 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.
override
-
disconnectDevice(
) → Future< bool> -
Disconnect from the current device.
override
-
getPrinterStatus(
) → Future< Map< String, dynamic> > -
Get printer status.
override
-
initialize(
) → Future< void> -
Initialize the printer plugin.
override
-
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.
override
-
printImage(
Uint8List imageData, {int commandType = 0, int? printerWidth, int? printerHeight, int rotation = 0, double scale = 0.9}) → Future< bool> -
Print image.
override
-
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> -
Prints a PDF file through the thermal printer
override
-
printQRCode(
String content, {int x = 280, int y = 10, int cellWidth = 8}) → Future< bool> -
Print QR code.
override
-
printText(
String text, {int fontSize = 1}) → Future< bool> -
Print text.
override
-
registerConnectionChangedHandler(
dynamic handler(Map< String, dynamic> )) → void -
Register connection status change handler.
override
-
registerScanResultsHandler(
dynamic handler(List< Map< )) → voidString, dynamic> > -
Register scan results handler.
override
-
scanDevices(
) → Future< bool> -
Start scanning for Bluetooth devices.
override
-
stopScan(
) → Future< bool> -
Stop scanning for Bluetooth devices.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited