搜尋套件、儲存庫與 APP 分類

套件詳情v0.0.41

zebrautility

用於與斑馬列印機配合使用的 Flutter 插件

AndroidiOS
近 30 天下載
409
喜歡數
41
Pub 分數
110

安裝套件

flutter pub add zebrautility

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

ZebraUtility 是一個 Flutter 插件,旨在促進與 Zebra 印表機的通訊,讓開發者能夠直接從 Flutter 應用程式發送列印命令並管理列印任務。它支援 Android 和 iOS 平台,非常適合需要標籤或收據列印的行動解決方案。該插件為將 Zebra 印表機功能整合到物流、零售和庫存管理應用中提供了一個簡單直觀的介面。基於原生 Zebra SDK 建構,確保了可靠的效能和對多種 Zebra 設備的相容性。

適用情境

  • 移動庫存管理
  • 零售收據打印
  • 發貨標籤生成
  • 資產追蹤應用
  • 現場服務文件

主要特色

  • 跨平台支援(Android 與 iOS)
  • 用於發送列印作業的簡單 API
  • 與斑馬打印機SDK的整合
  • 即時列印狀態監控
  • 支援 ZPL 和 EPL 語言

適合對象

  • 開發移動打印應用程式的開發者
  • 物流和供應鏈軟體
  • 零售和銷售點系統
  • 欄位資料採集工具
  • 工業移動應用

使用建議

  • 需要相容的斑馬列印機硬體
  • 可能需要為網絡列印進行額外設定
  • 僅限底層SDK支援的斑馬印表機型號
  • 需要平台特定的設定步驟
  • 依賴穩定的網路連接以使用無線列印機

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Flutter ZebraUtility

Zebra utility is a plugin for working easily with zebra printers in your flutter project.

  • Discovery bluetooth and wifi printers in android and bluetooth printers in iOS.
  • Connect and disconnect to printers
  • Set mediatype, darkness, calibrate command without writing any ZPL code for ZPL printers.
  • Rotate ZPL without changing your zpl.

Installation

Android

Add this code to android block in build.gradle (Module level).

android {
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
    }
}

iOS

Add Supported external accessory protocols in your info.plist and then add com.zebra.rawportto its. Add Privacy - Local Network Usage Description in your info.plist.

Example

Getting Started

for initial new object of printer use this.

     ZebraPrinter zebraPrinter = await Zebrautility.getPrinterInstance(
  onPrinterFound, onPrinterDiscoveryDone, onChangePrinterStatus,
  onPermissionDenied: onPermissionDenied);

You must pass 3 functions onPrinterFound, onPrinterDiscoveryDone and onChangePrinterStatus. onPrinterFound is called, when a new printer found. you can implement like this:

  Function onPrinterFound = (name, ipAddress) {
      print("PrinterFound :" + name + ipAddress);
    };

onPrinterDiscoveryDone is called, when discovery printers is done and finished. You can implement like this:

 Function onPrinterDiscoveryDone = () {
      print("Discovery Done");
    };

onChangePrinterStatus when the Status of printer changes, You can implement like this:

   Function onChangePrinterStatus = (status, color) {
      print("change printer status: " + status + color);
    };

onPermissionDenied is called, when android user deny location permission. You can implement like this:

  Function onPermissionDenied = () {
      print("Permission Deny.");
    };

Methods

For start Discovery bluetooth and wifi printres, use this method:

  zebraPrinter.discoveryPrinters();

For connecting to printer, pass ipAddreess for wifi printer or macAddress for bluetooth printer to connectToPrinter method.

 zebraPrinter.connectToPrinter("192.168.47.50");

You can set media type between Lable, Journal and BlackMark. You can choose media type by EnumMediaType.

  zebraPrinter.setMediaType(EnumMediaType.BlackMark);

You may callibrate printer after set media type. You can use this method.

zebraPrinter.calibratePrinter();

You can set darkness. the valid darkness value are -99,-75,-50,-25,0,25,50,75,100,125,150,175,200.

  zebraPrinter.setDarkness(25);

For print ZPL, you pass ZPL to print method.

  zebraPrinter.print("Your ZPL");

For rotate your ZPL without changing your ZPL, you can use this method. You can call this again for normal printing.

  zebraPrinter.rotate();

For disconnect from printer, use disconnect method. For battery saver, disconnect from printer when you not need printer.

  zebraPrinter.disconnect();

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。