CustomPrintJob class
Sammelt mehrere Custom-Druckbefehle und baut daraus EINEN Byte-Strom, der mit KeckPrinterService.printJob in einem einzigen Sendevorgang gedruckt wird (fuer Bluetooth deutlich robuster als viele Einzel-Sends).
Fluent-API — die Aufrufe lassen sich verketten:
final job = CustomPrintJob()
..text('Hallo')
..qr('https://kasseneck.at')
..feed(2)
..cut();
await KeckPrinterService.printJob(job);
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
-
barcode(
BarcodeType type, String data, {PosAlign align = PosAlign.center, int height = 100, int width = 3, BarcodeHri hri = BarcodeHri.below}) → CustomPrintJob -
1D-Barcode (GS k, Form 2).
typewaehlt die Symbologie,dataden Inhalt;height/width/hristeuern Hoehe, Modulbreite und Klartext. -
build(
EscPosGenerator gen) → List< int> -
Loest alle gesammelten Befehle gegen
genauf und liefert EINEN zusammenhaengenden Byte-Strom. -
cut(
{PosCutMode mode = PosCutMode.full}) → CustomPrintJob - Papier abschneiden.
-
drawer(
{PosDrawer pin = PosDrawer.pin2}) → CustomPrintJob - Kassenlade oeffnen.
-
feed(
int n) → CustomPrintJob -
Papiervorschub um
nZeilen. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
qr(
String data, {int size = 4}) → CustomPrintJob -
QR-Code.
size= native ESC/POS-QR-Groesse 1–8. -
raw(
List< int> bytes) → CustomPrintJob - Beliebige, bereits fertige ESC/POS-Bytes.
-
text(
String text, {PosStyles? styles}) → CustomPrintJob -
Text (mit optionalen
styles). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited