Search packages, repositories and app categories

Package detailsv3.2.0

flutter_datawedge

A Flutter package to communicate with Zebra DataWedge scanners using the DataWedge Intent API

Android
30-day downloads
8K
Likes
41
Pub points
160

Install package

flutter pub add flutter_datawedge

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that enables communication with Zebra DataWedge scanners on Android devices using the DataWedge Intent API. It allows developers to configure scanner settings, receive scan data, and manage input sources directly within Flutter applications. The package is designed for seamless integration with Zebra mobile devices, making it ideal for inventory, logistics, and retail environments where barcode scanning is essential. It leverages native Android functionality through platform channels to ensure reliable performance and low-level control over scanning operations.

Use cases

  • Inventory management
  • Retail checkout systems
  • Logistics tracking
  • Asset tagging
  • Barcode data collection

Key features

  • Real-time scan data reception
  • Configurable scanner input sources
  • Android-only native integration
  • Intent-based communication
  • Support for multiple Zebra device models

Suitable for

  • Developers targeting Zebra Android devices
  • Applications requiring reliable barcode scanning
  • Enterprise-grade inventory apps
  • Field service and warehouse software

Considerations

  • Requires Android platform only
  • Zebra device dependency
  • Needs proper DataWedge configuration
  • Limited to devices with DataWedge installed
  • May require additional permissions

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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.

Categories

Dependencies

Dependency list 8 items

Source repository

Projects using this package

No data available yet.