ReceiptRenderer class

Utility to render a simple receipt using ESC/POS commands. Supports paper widths of 58 mm and 80 mm. Automatically wraps item names and formats amounts in Rupiah.

Constructors

ReceiptRenderer()

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
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

render(List<ReceiptItem> items, {bool is80mm = false, int? columns, String storeName = 'TOKO CONTOH', String footer = 'Terima kasih'}) List<int>
Renders a list of items into ESC/POS bytes. is80mm selects paper width (default 58 mm). Alternatifnya, tentukan columns (jumlah karakter per baris) untuk kontrol penuh — contoh umum: 72 mm ≈ 48 kolom, 64 mm ≈ ~42 kolom, 57/58 mm ≈ 32 kolom. storeName dan footer menyesuaikan header/footer.