Skip to content

flutter_zpl_printer 0.2.0

Choose a tag to compare

@minhtri1401 minhtri1401 released this 02 Oct 07:14
· 8 commits to main since this release

Build and print with one import. flutter_zpl_printer now depends on and re-exports
flutter_zpl_generator.

Breaking

  • ZplPrintMode is now PrinterPrintMode (file printer_print_mode.dart). It's the print mode the
    printer reports in getStatus().printMode. The rename frees the name for flutter_zpl_generator's
    ZplPrintMode, the mode you set in a label's configuration. Migration: rename the type in your code.
    If you imported the generator with a prefix only to avoid this clash, you can drop the prefix.

Added

  • ZebraPrinter.printLabel(ZplGenerator label): builds and sends a label.
  • Everything from flutter_zpl_generator is available through
    package:flutter_zpl_printer/flutter_zpl_printer.dart (ZplGenerator, ZplText, ZplBarcode,
    ZplImageDownload, ...).

Changed

  • ZebraPrinter.printImage uses flutter_zpl_generator: a ~DG download (uncompressed hex) before
    ^XA, then ^XG to place it. That's the image path tested on hardware. New optional parameters:
    dithering (default threshold) and graphicName (default IMG).
  • GraphicsUtil.printImage (low-level inline ^GF) defaults to useCompression: false; Z64 is opt-in
    and not yet verified on a printer.

Fixed

  • Z64 checksum. Z64Compressor now computes CRC-16/XMODEM over the Base64 text, as Zebra's
    ZPL II Programming Guide specifies ("calculated over the :encoded_data field"). It was computed
    over the raw bitmap with CRC-16/CCITT-FALSE. Matches flutter_zpl_generator's implementation.
    Z64Compressor.crc16 now returns the XMODEM value and accepts any List<int>.

Documentation

  • README opens with a direct answer and adds an FAQ (Link-OS SDK, iOS without MFi, supported
    printers, images and PDFs, status, USB, web) and a comparison with other Zebra packages.
  • pub.dev Example tab now shows example/example.md (usage snippets) instead of the app shell.
  • Library-level API docs with a quick start; context7.json for coding-agent documentation indexes.
  • pub.dev topics: labels replaces usb (USB is experimental).

Example

  • New Print image section: prints a generated test picture via printImage, via
    printLabel(ZplGenerator(...)), and via GraphicsUtil.printImage (^GF, hex and Z64) for comparison.
  • The example no longer depends on flutter_zpl_generator directly.

📦 pub.dev/packages/flutter_zpl_printer · 📘 Integration guide · ❓ FAQ