easy_blue_printer 1.4.6 copy "easy_blue_printer: ^1.4.6" to clipboard
easy_blue_printer: ^1.4.6 copied to clipboard

The **Easy Blue Printer** plugin allows seamless integration of Bluetooth printers in a Flutter app, enabling the scanning, connection, and printing functionality.

Changelog #

1.4.6 - 2026-04-08 #

Docs #

  • Updated CHANGELOG to document all changes introduced in 1.4.5.

1.4.5 - 2026-04-08 #

Fixed #

  • Android: Reduced chunk size from 512 to 128 bytes to prevent buffer overflow on low-cost printers. Replaced the hardcoded 20 ms inter-chunk delay with an adaptive delay proportional to chunk size (chunkSize / 10 ms, minimum 5 ms). Added up to 2 retries with backoff on IOException per chunk, and validates socket connectivity before each write.
  • iOS: Replaced Thread.sleep(0.02) with real CoreBluetooth backpressure. .withResponse writes now block on a DispatchSemaphore until peripheral(_:didWriteValueFor:) fires (timeout 5 s). .withoutResponse writes check canSendWriteWithoutResponse and block on peripheralIsReady(toSendWriteWithoutResponse:) when the peripheral buffer is full. Chunk size capped at 128 bytes regardless of negotiated MTU. Up to 2 retries per chunk.

Changed #

  • example: Added Full Test button that prints a large text block → image → large text block, exercising the full flow control stack end-to-end.

1.4.4 - 2026-04-07 #

Fixed #

  • Corrupted output when mixing text and image: printImage was sending data in multiple separate socket writes (text flush → image chunks → newlines → reset), creating timing gaps that confused the printer. printImage now only appends the ESC/POS image bytes (alignment + bitmap + trailing feed + reset) to the print buffer — no socket IO. commitPrint then sends the entire buffer (preceding text + image + following text) as one continuous stream via the existing chunked sender, eliminating all gaps.
  • Removed 200ms sleep inside printImage — it was compensating for the gaps between separate write operations, which no longer exist.

1.4.3 - 2026-04-07 #

Fixed #

  • Print queue deadlock: jobs added to the queue while commitPrint was still running (e.g. await printData(...) followed immediately by printEmptyLine(...)) would be silently stuck and never executed. _processQueue now uses a do-while loop so any jobs that arrive during the commitPrint flush are processed in the next iteration instead of being ignored.

1.4.2 - 2026-04-07 #

Fixed #

  • printEmptyLine freeze: flushing all accumulated text inside printEmptyLine caused a large burst that triggered RFCOMM flow control, hanging the printer. printEmptyLine now only appends newlines to the buffer — the buffer is sent as one stream by commitPrint() when the queue empties (or by printImage() before image data).

1.4.1 - 2026-04-07 #

Fixed #

  • Android: Image printing regression introduced in 1.4.0 — alignment bytes were being flushed as a separate Bluetooth packet before the image data, which some printer firmware could not handle. They are now sent together with the first image chunk, restoring the original behavior.

1.4.0 - 2026-04-07 #

Changed (breaking improvement) #

  • Print buffering: printData and printEmptyLine no longer send data immediately. Instead, bytes are accumulated in an in-memory buffer and transmitted as a single continuous stream when:
    • printEmptyLine is called (natural flush point at end of receipt)
    • printImage is called (text is flushed first, then image is sent)
    • The print queue empties (automatic flush for text-only receipts)
  • This eliminates the root cause of corrupted output: the printer now receives one uninterrupted byte stream instead of many small bursts with gaps between them
  • Removed commandDelay (no longer needed)
  • Added internal commitPrint mechanism (called automatically — no API change required)

Fixed #

  • Corrupted characters when printing PDFs with multiple text items and/or images

1.3.9 - 2026-04-07 #

Added #

  • EasyBluePrinter.instance.commandDelay — configurable delay between consecutive print commands (default: 100ms). Increase if your printer still shows corrupted output (e.g. commandDelay = Duration(milliseconds: 150)). Set to Duration.zero to disable.

Fixed #

  • The inter-command delay is only applied when there are more jobs in the queue, so the last command does not add unnecessary latency

1.3.8 - 2026-04-07 #

Fixed #

  • Android: printData now consolidates all ESC/POS bytes into a single buffer and sends in 128-byte chunks with 10ms delays between chunks, preventing printer buffer overflow on receipts with many items
  • iOS: writeData now always applies 10ms delay after each BLE chunk regardless of write type (withResponse or withoutResponse), ensuring consistent flow control across all printer models

1.3.7 - 2026-04-07 #

Fixed #

  • Print queue: Multiple sequential print calls (printData, printImage, printEmptyLine) are now processed one at a time through an internal queue, eliminating corrupted characters caused by buffer overflow on the printer
  • Android: Replaced independent threads with a SingleThreadExecutor for all print operations, ensuring native-level serialization
  • iOS: Replaced DispatchQueue.global() with a dedicated serial queue for print operations, ensuring native-level serialization
  • No more need for manual delays (Future.delayed) between print calls in the consuming app

1.3.6 - 2026-03-31 #

Changed #

  • Updated README with PaperConfig documentation (API reference, quick start, enums table) in English and Portuguese

1.3.5 - 2026-03-30 #

Added #

  • PaperConfig entity to configure paper roll size dynamically (roll58mm = 384px, roll80mm = 576px, or custom widthPixels)
  • EasyBluePrinter.configurePrinter(PaperConfig) method — call once after connecting to set the roll width used for image printing on both Android and iOS

1.3.4 - 2026-02-14 #

  • Updated PIX donation key in README

1.3.3 - 2026-02-11 #

  • FIX README

1.3.2 - 2026-02-11 #

Fixed #

  • iOS: Connected peripheral now appears in scan results even if not discovered during scan
  • Upgraded Flutter SDK to 3.38.9
  • Fixed VS Code launch configuration

1.3.1 - 2026-02-10 #

  • FIX README

1.3.0 - 2026-02-10 #

Added #

  • iOS: Image printing support
  • iOS: isConnected use case
  • iOS: Image processing utilities (scale and bitmap decode)
  • Docs: Complete bilingual README (English and Portuguese) for pub.dev

Fixed #

  • iOS: First scan no longer returns empty — waits for CBCentralManager to be ready before scanning
  • iOS: Scan loading now stays visible until devices are found
  • Android: Image printing sends data in chunks to avoid buffer overflow
  • Android: Filter out unnamed devices from scan results

1.2.7 - 2025-02-26 #

release #

  • Added: Fix erros

1.2.6 - 2025-02-26 #

release #

  • Added: Fix connect to device

1.2.5 - 2025-02-25 #

release #

  • Added: Fix get device is connected

1.2.4 - 2025-02-24 #

release #

  • Added: Fix get device is connected

1.2.3 - 2025-02-23 #

release #

  • Added: Fix SDK

1.2.2 - 2025-02-23 #

release #

  • Added: Fix README

1.2.1 - 2025-02-23 #

release #

  • Added: Request bluetooth permissions in constructor

1.2.0 - 2025-02-15 #

release #

  • Added: Request bluetooth permissions

1.1.4 - 2025-02-15 #

release #

  • Added: Fixed Print Image

1.1.3 - 2025-02-15 #

release #

  • Added: Fixed Print Image

1.1.2 - 2025-02-15 #

release #

  • Added: Function Print Image

1.1.1 - 2025-02-15 #

release #

  • Added: Fixed README EN-US

1.1.0 - 2025-02-15 #

release #

  • Added: Fixed README

1.0.9 - 2025-02-15 #

release #

  • Added: Fixed ndkVersion android

1.0.8 - 2025-02-15 #

release #

  • Added: Fixed permissions android

1.0.7 - 2025-02-14 #

release #

  • Added: Fixed crash

1.0.6 - 2025-02-14 #

release #

  • Added: Fixed name function => scanDevices to getPairedDevices

1.0.5 - 2025-02-14 #

release #

  • Added: Fix version kotlin

1.0.4 - 2025-02-14 #

release #

  • Added: Added THREAD to the functions

1.0.3 - 2025-02-14 #

release #

  • Added: Get device is connected.

1.0.2 - 2025-02-14 #

release #

  • Added: Sdk version.

1.0.1 - 2025-02-14 #

release #

  • Added: Sdk version.

1.0.0 - 2025-02-12 #

Initial release #

  • Added: Bluetooth device scanning functionality.
  • Added: Connect and disconnect functionality for Bluetooth printers.
  • Added: Ability to print text with customizable settings (font size, alignment, bold).
  • Added: Print empty lines for better formatting.
  • Added: Example Flutter app for testing and demonstration of the features.
3
likes
140
points
190
downloads

Documentation

API reference

Publisher

verified publisherlucassilva.dev

Weekly Downloads

The **Easy Blue Printer** plugin allows seamless integration of Bluetooth printers in a Flutter app, enabling the scanning, connection, and printing functionality.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on easy_blue_printer

Packages that implement easy_blue_printer