pos_universal_printer 0.2.3 copy "pos_universal_printer: ^0.2.3" to clipboard
pos_universal_printer: ^0.2.3 copied to clipboard

A Flutter plugin for printing POS receipts and labels on various thermal printers. Multi-role routing with Bluetooth & TCP support, custom sticker API with 4 complexity levels.

Changelog #

0.2.3 #

🖼 Logo & Image Printing (Compat Layer) #

  • Added printLogoAndLines(assetLogoPath:, lines:, preferBitImage:) for single‑payload (logo + text) printing.
  • Legacy ESC * bit‑image fallback (preferBitImage: true) for printers that reject GS v 0 raster.
  • Threshold tuning (logoThreshold) documented for balancing contrast vs fill.

🔄 Blue Thermal Printer Compatibility #

  • Added BlueThermalCompatPrinter facade (methods: printCustom, printLeftRight, printNewLine, printImageBytes, printBarcode, printQRcode, paperCut)
  • Simple migration path from blue_thermal_printer with almost no code changes
  • Added alignment + size enums (Align, Size) mirroring legacy API values

✨ Improvements #

  • Restored legacy style left‑right padded alignment with truncation & tail preservation.
  • Reduced Bluetooth fragmentation by batching logo + lines before send.
  • Added detailed debug logging around image pipeline and bit‑image fallback path.

� Features #

  • Receipt compat + existing multi‑role architecture (cashier/kitchen/sticker)
  • Works alongside sticker invoice system (Levels 1–4)

�📖 Documentation #

  • README updated (logo printing guide, migration, troubleshooting table).
  • README restructured: quick overview, migration guide, method mapping table.
  • Added examples for compat receipt + sticker APIs.

🔧 Internal #

  • Added rawBytesToBitImage helper to image utils for direct conversion.
  • Prefer single builder flush to minimize partial writes on slower modules.
  • No breaking changes to existing public APIs.

🔄 Blue Thermal Printer Compatibility #

  • Added BlueThermalCompatPrinter facade (methods: printCustom, printLeftRight, printNewLine, printImageBytes, printBarcode, printQRcode, paperCut)
  • Simple migration path from blue_thermal_printer with almost no code changes
  • Added alignment + size enums (Align, Size) mirroring legacy API values

📦 Features #

  • Receipt compat + existing multi‑role architecture (cashier/kitchen/sticker)
  • Works alongside sticker invoice system (Levels 1–4)

📖 Documentation #

  • README restructured: quick overview, migration guide, method mapping table
  • Added examples for compat receipt + sticker APIs

🛠 Internal #

  • No breaking changes to existing public APIs
  • Version bump for pub.dev release

0.2.2 #

🚀 NEW: 3-Level API for Better User Experience #

LEVEL 1: Super Simple (ONE-LINER)

  • Added CustomStickerPrinter.printInvoice() - Print invoice dengan 1 line code
  • Perfect untuk pemula yang ingin langsung pakai

LEVEL 2: Template with Options (CUSTOMIZABLE)

  • Added CustomStickerPrinter.printInvoiceSticker() - Template dengan opsi customization
  • Added StickerSize enum: mm40x30, mm58x40, mm40x25, mm32x20
  • Added FontSize enum: small, medium, large

LEVEL 3: Multi-Menu Restaurant Style (PROFESSIONAL)

  • Added CustomStickerPrinter.printRestaurantOrder() - Print multiple menu items
  • Added MenuItem class untuk data structure
  • Setiap menu = 1 sticker terpisah (perfect untuk restoran)

LEVEL 4: Full Custom (ADVANCED)

  • Existing CustomStickerPrinter.printSticker() dengan kontrol penuh

📖 Documentation #

  • Updated README dengan 4 level complexity examples
  • Improved public documentation untuk adoption yang lebih mudah
  • Added comprehensive parameter guides

0.2.2 #

  • Update README to full English for international developers
  • Improved examples with English menu items
  • Enhanced professional documentation

0.2.1 #

🔧 Documentation & API Fixes

📚 Documentation Updates #

  • Fixed README Examples: Updated all examples to match actual main.dart implementation
  • Complete Invoice Style Guide: Added exact invoice implementation from main.dart with proper wrap text and dynamic height
  • Bluetooth Connect/Disconnect Guide: Added comprehensive guide with loading states
  • Parameter Reference: Complete customization guide for all parameters

🛠️ API Consistency #

  • README now matches main.dart: All examples are now consistent with working implementation
  • Invoice Style Example: Shows proper 2-menu example with _printSingleMenuStickerOnly method
  • Text Wrapping: Includes _wrapText helper for automatic text wrapping
  • Dynamic Height: Proper clamp(15.0, 30.0) implementation

📖 New Documentation Sections #

  • Font size guide (Font 1-8 with size multipliers explanation)
  • Complete parameter reference for customization
  • Bluetooth scanning with loading states
  • Left-right same line positioning examples

0.2.0 #

🎉 Major Feature Update - Custom Sticker API & Invoice Templates

🆕 New Features #

  • Custom Sticker API: Complete helper for TSPL sticker printing with easy-to-use StickerText and StickerBarcode classes
  • Text Alignment: Support for 'left', 'center', 'right' alignment with automatic positioning
  • 4-Side Margins: Full control with marginLeft, marginTop, marginRight, marginBottom
  • Invoice Style Templates: Ready-to-use invoice printing with customer names, timestamps, and modifications
  • Built-in Templates: printProductSticker40x30() and printAddressSticker58x40() for common use cases
  • Auto Text Wrapping: Smart text wrapping that preserves whole words
  • Dynamic Heights: Automatic sticker height calculation based on content

🔧 Improvements #

  • Enhanced Documentation: Comprehensive examples and parameter explanations
  • Better Font Support: Validated font ranges (1-8) with size multipliers
  • Orientation Fix: TSPL DIRECTION 0 for proper sticker orientation
  • Multi-line Support: Easy handling of multiple text lines with proper spacing

📚 New Examples #

  • Invoice style printing with customer data
  • Product and address label templates
  • Text alignment demonstrations
  • Left-right same line positioning
  • Full margin control examples

🐛 Bug Fixes #

  • Fixed upside-down text in TSPL stickers
  • Corrected text positioning calculations
  • Improved error handling in connection management

0.1.3 #

  • Fix repository URL and add more examples.

0.1.2 #

  • Fix repository URL to point to the package subdirectory in the monorepo for pub.dev verification.

0.1.1 #

  • Add example/, LICENSE, README improvements, and API dartdoc.
  • Fix analyzer warnings and formatting.
  • Prep for pub.dev publishing flow and improve documentation.

0.1.0 #

  • Initial release of the federated interface package.
  • ESC/POS, TSPL, CPCL support via builders.
  • Role-based printer mapping.
  • Android Bluetooth Classic and TCP; iOS TCP.
  • Basic receipt renderer and cash drawer command.

0.1.3 #

  • README: update install snippet to ^0.1.3 and add full example app.
  • Public exports for builders/renderers; package example uses them.
4
likes
0
points
354
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for printing POS receipts and labels on various thermal printers. Multi-role routing with Bluetooth & TCP support, custom sticker API with 4 complexity levels.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

async, collection, flutter, meta

More

Packages that depend on pos_universal_printer

Packages that implement pos_universal_printer