Skip to content

Flutter plugin wrapper around Sunmi SDK for barcode scanners

License

Notifications You must be signed in to change notification settings

lavaloon-eg/sunmi_barcode_plugin

 
 

Repository files navigation

sunmi_barcode_plugin

Flutter plugin that wraps Sunmi Android SDK for integrated hardware barcode scanners. Checked and working with Sunmi L2 device. All methods from SDK are supported.

Getting Started

Create instance of the plugin

  var sunmiPlugin = SunmiBarcodePlugin();

Then somewhere in your code you can check if device has Sunmi integrated scanner

 bool hasScanner = await sunmiPlugin.isScannerAvailable();

or find out exact scanner model number

int model = await sunmiPlugin.getScannerModel();

To get notified when barcode is scanned simply subscribe to stream

var barcodeSubscription = sunmiPlugin.onBarcodeScanned().listen((event) {
          print(event);
        });

To scan programatically you can use scan and stop methods.

If you don't have Sunmi device or just want to support more devices without implementing each SDK please check flutter_barcode_listener.

About

Flutter plugin wrapper around Sunmi SDK for barcode scanners

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 59.7%
  • Dart 40.3%