Printable class sealed

Something the device can print — plain Printable.text, device-rendered Printable.html, or a structured Printable.receipt.

One type, so a host prints anything through a single call (HaloSdkUi.print) rather than a method per kind. Sealed with a factory per kind, so a caller picks exactly one shape and carries exactly its data: there is no way to build a "text" that also holds receipt lines. The type crosses the channel and the native side switches on it.

Constructors

Printable.html(String html, {bool clean})
html rendered by the device's own HTML support. How much HTML the hardware understands is the device's business — keep it simple.
const
factory
Printable.receipt(Receipt receipt)
A structured receipt — a title, rows, a divider, a QR — printed as one correctly-spaced job. What a "Print receipt" button reaches for.
const
factory
Printable.text(String text, {bool clean, bool center, String? barcode})
A single line of text in the device's default formatting. For anything structured — formatting, images, a QR — use Printable.receipt.
const
factory

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited