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

套件詳情v3.2.0

flutter_datawedge

一個用於透過 DataWedge Intent API 與 Zebra DataWedge 掃描儀通訊的 Flutter 套件

Android
近 30 天下載
7670
喜歡數
41
Pub 分數
160

安裝套件

flutter pub add flutter_datawedge

套件介紹

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

一個 Flutter 套件,透過 DataWedge Intent API 實現與 Zebra DataWedge 掃描儀在 Android 裝置上的通訊。它允許開發者設定掃描儀參數、接收掃描資料,並直接在 Flutter 應用程式中管理輸入來源。此套件專為與 Zebra 電子裝置無縫整合而設計,非常適合庫存、物流和零售環境,這些場景中條碼掃描至關重要。它透過平台通道利用原生 Android 功能,確保穩定效能並實現對掃描作業的底層控制。

適用情境

  • 庫存管理
  • 零售結帳系統
  • 物流追蹤
  • 資產標記
  • 條碼資料收集

主要特色

  • 即時掃描數據接收
  • 可設定的掃描儀輸入來源
  • 僅限 Android 的原生整合
  • 基於意圖的通信
  • 支援多種斑馬裝置型號

適合對象

  • 針對 Zebra Android 裝置的開發者
  • 需要可靠條碼掃描的應用程式
  • 企業級庫存應用
  • 現場服務和倉儲軟件

使用建議

  • 僅需 Android 平台
  • Zebra 設備依賴
  • 需要正確的 DataWedge 配置
  • 僅限安裝了 DataWedge 的設備
  • 可能需要額外權限

原始 README

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

flutter_datawedge

pub package

A Flutter package to communicate with Zebra DataWedge scanners.

Internally, this package uses the DataWedge APIs and therefore is only compatible with Android.

Getting Started

Example

Initialize the FlutterDataWedge Object and attach a listener to the onScanResult Stream.


    FlutterDataWedge dw = FlutterDataWedge();
    await dw.initialize();
    await createDefaultProfile(profileName: "Example Profile");
    StreamSubscription onScanSubscription = dw.onScanResult.listen((ScanResult result) {
        print(result.data);
    });
    
    [...]
    
    // Stop listening for new scans.
    onScanSubscription.cancel();

Also checkout the example application.

Profiles

Unlike previous versions, this version of the package won't create a profile and configure it while calling initialize. Instead a profile can be created using the createDefaultProfile method. To query all available profiles use requestProfiles, to query the active profile use requestActiveProfile. The functions waitForProfiles and waitForActiveProfile can be used to wait results after the requesting function has been called.

Further, see the official documentation to create, update or replace a DataWedge profiles.

async/await

Event though the public methods enableScanner(), activateScanner() and scannerControl() are asynchronous they return as soon as the command is executed. Each of these methods (as well as initialize()) will cause ActionResult objects to be emitted on the onScannerEvent Stream. Those can be used to determine the outcome of a command and properly wait for it. Here is a short example:

    FlutterDataWedge dw = FlutterDataWedge();
    await dw.initialize();
    
    // This would be a properly awaited version of enableScanner
    Future<ActionResult> enableScanner() {
        final completer = Completer<ActionResult>();
        final myIdentifier = "someIdentifier";
        
        StreamSubscription onScannerEventSubscription = dw.onScannerEvent.listen((ActionResult result) {
            if (result.commandIdentifier == myIdentifier) {
                completer.complete(result);
            }
        });
        
        
        dw.enablescanner(true,commandIdentifier: myIdentifier);
        
        return completer.future;
    }

Acknowledgements

The package was started by rafaeljustinox and and contains contributions by LenhartStephan. It is now maintained by Circus Kitchens.

所屬分類

依賴

依賴清單 8 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。