blue_thermal_compat library

Compatibility layer for developers migrating from the blue_thermal_printer package (kakzaki.dev). This provides a minimal facade with method names & signatures that resemble the old API so you can switch dependencies with minimal refactors, while internally using the modern PosUniversalPrinter architecture.

Example migration:

// OLD import 'package:blue_thermal_printer/blue_thermal_printer.dart'; final bluetooth = BlueThermalPrinter.instance; bluetooth.printCustom('Hello', Size.bold.val, Align.center.val);

// NEW (after adding this package) import 'package:pos_universal_printer/pos_universal_printer.dart'; final compat = BlueThermalCompatPrinter.instance; await compat.ensureDevice(role: PosPrinterRole.cashier, device: myDevice); compat.printCustom('Hello', Size.bold.val, Align.center.val);

Stickers / labels: Keep using CustomStickerPrinter.printSticker(...).

Classes

Align
Alignment enum mimic.
BlueThermalCompatPrinter
Main compatibility facade. Collects commands into an ESC/POS builder and flushes them when requested (or on cut). Not a full re-implementation but enough for common migration scenarios.
CompatLine
Public line descriptor for combined logo+lines API.
Size
Enum copies mimicking the old plugin sizing constants. Internally we map them to ESC/POS bold & size flags (limited by standard fonts).