receipt_printer library

Composable receipt UI, exact formatting, and an animated printer shell.

Classes

Receipt
An immutable receipt document, independent of presentation and transport.
ReceiptAudioConfig
Optional audio policy, separate from receipt content and global device mute. Pass to ReceiptPrinter.audio, or use with your own tear callback.
ReceiptBuilders
Optional customization slots. Applications own semantics for custom widgets.
ReceiptCapture
Attaches capture to arbitrary receipt content. printerBuilder optionally surrounds the receipt with a shell; both export targets share one live tree.
ReceiptCaptureOptions
Bounded PNG capture options. No file is written or uploaded by the package.
ReceiptCode
A scannable code, with a bounded payload validated before rendering.
ReceiptCodeView
Encodes actual QR or Code 128 data, including a quiet zone.
ReceiptConfettiConfig
Bounded vector celebration. Never included in receipt or printer PNG capture.
ReceiptFooter
Closing message and app-owned machine-readable-code areas.
ReceiptFormatter
Dependency-free exact money and quantity formatting for receipts.
ReceiptGrabArea
Logical-pixel gesture region. Outside this region, scrolling stays available.
ReceiptHeader
Default merchant heading and optional mark.
ReceiptItem
A purchased line with integer minor-unit money and exact thousandths.
ReceiptItemRow
Default accessible, wrapping product line.
ReceiptMetadata
An application-formatted key/value row; multiline values are supported.
ReceiptPaper
A reusable shaped paper surface for typed or completely custom content.
ReceiptPaperEdge
Deterministic edge geometry independent of paper colors and shadows.
ReceiptPaperShadowStyle
Edge-following shadow. Blur/spread/offset use logical pixels.
ReceiptPaperStyle
Physical-sheet styling, separate from receipt typography and host viewport.
ReceiptPrinter
An animated checkout visualization, not a payment operation or printer driver.
ReceiptPrinterController
Captures a mounted receipt independently of Studio and printer transport. Own and dispose one controller per ReceiptCapture or ReceiptPrinter.
ReceiptPrinterLabels
Localized machine announcements, independent of receipt money labels.
ReceiptPrinterPreset
A physical appearance, receipt style and interaction from one source. These are generic visual objects, not drivers or manufacturer products.
ReceiptPrinterStyle
Visual and motion tokens for the printer, independent of receipt paper.
ReceiptRenderer
Bounded PNG export of an already-painted, complete static receipt.
ReceiptRipCallbacks
Host application callbacks.
ReceiptRipConfig
Opt-in paper interaction. No data, payment or transport operation is performed.
ReceiptRipPhysics
Pull resistance and short detached motion; all distances are logical pixels.
ReceiptSection
An optional labelled group of custom key/value rows before totals.
ReceiptSeparator
A decorative rule excluded from accessibility traversal.
ReceiptSound
An application-owned sound asset. No playback plugin is required by the UI.
ReceiptThemeData
Central paper tokens, installed in ThemeData.extensions or on a view.
ReceiptTotal
A caller-labelled summary row, including subtotal, tax, fees, discounts, and final totals.
ReceiptTotalRow
A caller-labelled total or signed adjustment.
ReceiptView
A static document or lazy viewport, without printer hardware or animation.

Enums

ReceiptCodeType
ReceiptConfettiOrigin
Origins are relative to the paper, not the application window.
ReceiptConfettiTrigger
Automatic event selection. An explicit controller celebration is always manual.
ReceiptCurrencyPosition
Placement of a currency label relative to the numeric value.
ReceiptDividerStyle
The appearance of a receipt rule.
ReceiptPaperEdgeShape
Reusable top/bottom cut patterns. Custom samples are normalized to 0–1.
ReceiptPaperHeightMode
Content sizes naturally; fixed reserves a minimum sheet height and extends on overflow. Neither mode clips content or creates a scrollable viewport.
ReceiptPaperShape
Paper silhouette. Edge depth/count are controlled by the theme's tooth tokens.
ReceiptPrinterShape
Visual housing geometries, not claims of physical device compatibility.
ReceiptPrinterStage
Externally controlled visualization stages; these do not initiate payment.
ReceiptRipDirection
Physical pull axis, independent of text direction.
ReceiptRipLineStyle
The connection guide, separate from the eventual torn contour.
ReceiptRipState
Observable interaction lifecycle. Armed is emitted before ripping begins.

Typedefs

ReceiptItemBuilder = Widget Function(BuildContext context, ReceiptItem item, int index)
Overrides one purchased line. The index is stable within the receipt.
ReceiptPartBuilder = Widget Function(BuildContext context, Receipt receipt)
Overrides a whole header or footer.
ReceiptTotalBuilder = Widget Function(BuildContext context, ReceiptTotal total, int index)
Overrides one summary row.