パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.0.41

zebrautility

ゼブラプリンタとの連携に使用するFlutterプラグイン

AndroidiOS
30日間ダウンロード
409
いいね数
41
Pub ポイント
110

パッケージをインストール

flutter pub add zebrautility

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

ZebraUtility は、Zebra プリンターとの通信を容易にするための Flutter プラグインであり、開発者が Flutter アプリから印刷コマンドを送信し、印刷タスクを直接管理できるようにします。Android および iOS プラットフォームをサポートしており、ラベルやレシートの印刷が必要なモバイルソリューションに最適です。物流、小売、在庫管理で使用されるアプリケーションに Zebra プリンター機能を統合するためのシンプルなインターフェースを提供します。ネイティブの Zebra SDK を基盤として構築されており、幅広い Zebra デバイスとの信頼性の高いパフォーマンスと互換性を確保しています。

用途

  • モバイル在庫管理
  • 小売レシート印刷
  • 配送ラベルの生成
  • 資産トラッキングアプリケーション
  • 現場サービス文書

主な機能

  • クロスプラットフォーム対応(Android および iOS)
  • 印刷ジョブを送信するためのシンプルな API
  • Zebraプリンタ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();

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。