god_of_flutter_printer library

Classes

AgentProbeResult
Result of probing a local print-agent webhook.
BlePrintConnection
BlePrintConnector
BluetoothAgentPrintConnection
BluetoothAgentPrintConnector
Sends encoded bytes to a local print-agent webhook (Chrome/web → Bluetooth).
BluetoothDeviceInfo
A discoverable Bluetooth printer/end-point.
BluetoothPrintConnection
BluetoothPrintConnector
CharsetEncodeResult
Result of encoding text with optional custom-font download preamble.
CharsetEngine
Encodes multilingual text for ESC/POS printers.
DocumentPrintPayload
EscPosCustomFont
Builds ESC/POS custom-font download commands (ESC &) — not image print.
EscPosEncoder
Builds ESC/POS byte streams without third-party dependencies.
GlyphBitmap
Monochrome glyph matrix used to build ESC/POS custom font downloads.
JobEvent
Stream event emitted while a job progresses.
JobIdGenerator
Generates unique job identifiers.
JobLogEntry
Single log line tied to a jobId.
JobResult
Final outcome stored in memory keyed by jobId.
JobStatusStore
In-memory job status store — no database, no API.
LocalAgentPrintConnection
NetworkAgentPrintConnection
NetworkAgentPrintConnector
Sends encoded bytes to a local print-agent webhook (Chrome/web → TCP/IP).
NetworkPrintConnection
PayloadEncoder
Converts PrintRequest payload + mode into protocol bytes.
PrintAgentClient
HTTP client for the local print-agent (Chrome/web → USB on same PC).
PrintConnection
Describes how to reach a printer for a single job.
PrintConnectionResolver
Maps per-job PrintTarget + platform to internal PrintConnection.
PrintConnector
Transport abstraction used by the worker for a single job.
PrintDocument
Structured print document — protocol-neutral layout tree.
PrintDocumentBlock
One layout element inside a PrintDocument.
PrinterJobConfig
Printer row from DB — all keys present; unused values are empty.
PrintJobBody
Unified print job JSON from your DB / API — same shape for every POS user.
PrintJobBuilder
Builds PrintRequest from a validated PrintJobSpec.
PrintJobDefaults
Package fallbacks for optional technical fields only.
PrintJobFieldError
A single validation problem on a PrintJobSpec field.
PrintJobOptions
PrintJobResolver
Turns PrintJobBody (DB JSON) into PrintJobSpec for the current platform.
PrintJobResult
Outcome of PrintWorker.printJob — validation failure or print result.
PrintJobSpec
One self-contained print job — connection and payload travel together.
PrintJobValidationResult
Outcome of synchronous PrintJobValidator checks (no I/O).
PrintJobValidator
Synchronous, zero-I/O validation — fails instantly before any print work.
PrintLogger
Structured logger keyed by jobId.
PrintOptions
Options that control a single print execution.
PrintPayload
Payload supplied by the caller — format depends on PrintMode.
PrintRequest
Complete request for one stateless print job.
PrintTarget
Printer endpoint for one job — each order/item can target a different printer.
PrintTemplate
Template definition loaded from bundled JSON assets.
PrintWorker
Stateless async print worker — no DB, no API, no printer registry.
RawPrintPayload
ScriptUtils
Detects script boundaries inside Unicode text.
TcpPrintConnector
TCP/IP connector using Dart Socket.
TemplateBlock
TemplateEngine
Merges template placeholders with runtime data and renders a document.
TemplatePrintPayload
TemplateRepository
Resolves bundled template JSON assets.
TextPrintPayload
TsplEncoder
Minimal TSPL encoder for label jobs.
UsbPrintConnection
UsbPrintConnector
UuidJobIdGenerator
WebhookPrintConnector
Sends encoded bytes to a local print-agent webhook (Chrome/web → USB).
ZplEncoder
Minimal ZPL encoder for label jobs.

Enums

BluetoothTransportType
JobStatus
Lifecycle status for a print job tracked in memory.
LogLevel
Log severity for per-job tracing.
PaperWidth
Paper widths commonly used by thermal printers.
PrintConnectionKind
How the developer targets a printer (platform-agnostic).
PrintJobStatus
PrintMode
How the caller supplies print content on each job.
PrintProtocol
Supported printer command protocols.
ScriptLocale
Supported locale/script identifiers for charset encoding.

Constants

supportedPaperWidthsMm → const Set<int>
Paper widths supported by validation and the example app.

Functions

charsPerLineForWidth(int paperWidthMm) int
Character width hint derived from paper width (Font A, 12x24).
connectionLockKey(PrintConnection connection) String
connectionLockKeyFor(PrintConnection connection) String
createBluetoothAgentConnector(BluetoothAgentPrintConnection connection) PrintConnector
createConnector(PrintConnection connection) PrintConnector
createNetworkAgentConnector(NetworkAgentPrintConnection connection) PrintConnector
createWebhookConnector(LocalAgentPrintConnection connection) PrintConnector
parsePrintMode(String raw) PrintMode
parsePrintProtocol(String raw) PrintProtocol?
rasterDotsForWidth(int paperWidthMm) int
Printable raster width in dots for multilingual / image lines.