printer library

The printer half of the plugin's public surface — the provider it drives and the receipt it prints. Imported through halo_sdk_ui.dart, so a host writes import 'package:halo_sdk_ui/halo_sdk_ui.dart' and has all of it.

Classes

BarcodeLine
A 1D barcode rendered from data — a till receipt's bottom transaction barcode. symbology is the encoding (code128 by default, matching a shop till); showText prints the human-readable value below the bars, as a printed slip does. Centred on the paper.
DividerLine
A full-width rule, for separating sections of a receipt. Plain, it is dashes edge to edge. Give it a label and it reads as that label followed by fill running on to the width — a cut here ======== tear line, say.
FeedLine
Blank vertical space — lines empty lines, one by default.
HDPrinterDevice
An external printer this device can reach, named by its address — a result of HaloSdkUi.scanForPrinters, and what HaloSdkUi.selectPrinter takes.
ImageLine
A base64-encoded image (PNG or JPEG). A data: URI prefix is tolerated. Any image wider than the paper is scaled down to fit; a narrower one is centered by default.
Printable
Something the device can print — plain Printable.text, device-rendered Printable.html, or a structured Printable.receipt.
QrLine
A QR code rendered from data, printed size×size pixels.
Receipt
A receipt as an ordered list of typed lines.
ReceiptLine
One line of a Receipt. Sealed, so a host builds a receipt from exactly the kinds the device can print and nothing else.
TextLine
A line of text, with the formatting the device supports.

Enums

PrintAlign
How a ReceiptLine.text line sits across the paper. The values match the device's own alignment codes, so the mapping is the ordinal.
PrinterProvider
A receipt printer this plugin can drive.