패키지, 저장소 및 앱 카테고리 검색

GitHub 저장소circus-kitchens/flutter_datawedge

flutter_datawedge

🦓 Zebra DataWedge 스캐너와 통신하는 Flutter 플러그인

flutter_datawedge 프로젝트 이미지
스타
26
포크
16
최근 푸시(UTC)
2026. 2. 6.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

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.

Circus GitHub avatar
GitHub 작성자

Circus ↗

Disrupting the global food industry with AI and robotics

언어DartKotlin

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 14 개

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗