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
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', }) → List<int> -
Renders a list of
itemsinto ESC/POS bytes.is80mmselects paper width (default 58 mm). Alternatifnya, tentukancolumns(jumlah karakter per baris) untuk kontrol penuh — contoh umum: 72 mm ≈ 48 kolom, 64 mm ≈ ~42 kolom, 57/58 mm ≈ 32 kolom.storeNamedanfootermenyesuaikan header/footer.