ZebraPrinterRepository class
Low-level bridge between the Flutter layer and the native Android plugin.
All methods communicate over MethodChannel or EventChannel with the
ZplZebraPlugin Kotlin class. Throw PlatformException on native errors,
which are re-thrown as descriptive String exceptions for convenience.
Constructors
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
-
connectToPrinter(
String ipAddress, String port) → Future< bool?> -
Establishes a WiFi connection to the printer at
ipAddress:port. -
disconnectPrinter(
) → Future< bool?> - Closes the active printer connection.
-
getConnectionStatusStream(
) → Stream< bool> -
Returns a broadcast stream that emits
truewhen the printer is connected andfalsewhen it is not. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
printBarcode(
String barcodeData, {String x = '10', String y = '10', int type = 4, String orientation = 'N', String height = '100', String f = 'Y'}) → Future< String?> - Prints a barcode label.
-
printImage(
String imagePath, {String x = '10', String y = '10'}) → Future< String?> - Prints a bitmap image from an absolute file path.
-
printPDF(
String pdfPath, {String x = '10', String y = '10'}) → Future< String?> - Prints the first page of a PDF file from an absolute file path.
-
printText(
String textData, {String x = '0', String y = '0', int type = 0, String orientation = 'N', int size = 3}) → Future< String?> - Prints a text string.
-
sendZPLCommand(
String zplCommand) → Future< String?> - Sends a raw ZPL command string to the printer.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited