Pakete, Repositories und App-Kategorien suchen

Paketdetailsv0.1.4

flutter_barcode_listener

Hören Sie auf jeden Hardware-Barcodescanner ohne irgendein Hersteller-SDK

AndroidiOSWebmacOSWindowsLinux
30-Tage-Downloads
17.700
Likes
183
Pub-Punkte
150

Paket installieren

flutter pub add flutter_barcode_listener

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

Flutter Barcode Listener ist ein plattformübergreifendes Paket, das Anwendungen ermöglicht, Eingaben von beliebigen Hardware-Barcodescannern zu empfangen, ohne dass Hersteller-spezifische SDKs erforderlich sind. Es funktioniert nahtlos auf Android, iOS, Web, macOS, Windows und Linux, indem es gescannte Daten über Standard-Eingabeereignisse erfasst. Das Paket vereinfacht die Komplexität der Hardwareintegration und erleichtert die Implementierung von Barcode-Scanning-Funktionen in Bereichen wie Einzelhandel, Bestandsverwaltung, Logistik und Verkaufsstellen. Entwickler können sich auf die Geschäftslogik konzentrieren, anstatt sich mit gerätespezifischen Konfigurationen zu beschäftigen.

Anwendungsfälle

  • Einzelhandelsbestandstracking
  • Verkaufspunktsysteme
  • Logistik und Versand
  • Asset-Management
  • Mobil-Daten-Eingabe
  • Lagerbetrieb

Hauptmerkmale

  • Plattformübergreifende Unterstützung
  • Kein Hersteller-SDK erforderlich
  • Automatische Eingabedetektion
  • Einfaches ereignisbasiertes API
  • Kompatibel mit jedem USB-/Bluetooth-Barcodescanner
  • Reaktion bei Echtzeit-Scans

Geeignet für

  • Entwickler, die POS-Apps erstellen
  • Lagerverwaltungslösungen
  • Feldservice-Anwendungen
  • E-Commerce-Mobiltools
  • Unternehmensdatenerfassungssysteme

Hinweise

  • Benötigt physisches Barcode-Scanning-Hardware
  • Auf einigen Plattformen ist möglicherweise eine Berechtigungsverwaltung erforderlich
  • Beschränkt auf textbasierte Barcode-Formate
  • Nicht geeignet für kamerabasierte Scans
  • Abhängig von der systemweiten Eingabenerkennung
  • Die Webunterstützung kann je nach Browser variieren

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

flutter_barcode_listener

Listen for any hardware barcode scanner

Problems with barcode scanning

If you need to get barcode scanned from some hardware barcode scanner you generally have few ways to do it.

  1. implement some text input control (IE. TextEdit), call focus on it and make the scan
  2. listen for some special system event (IE. intent fired from Android service)
  3. listen for raw keyboard events

First aproach is simple, and if you're ok to catch scanned barcodes only when you have focus on text control you're good to go and you don't need this package.

If you however need to somehow get scanned barcodes even when you don't have focus on text input control (or no text input control at all) you're left with two other options.

Listening for special system events (IE. Anroid service intents) is always tied for specific manufacturer/device that usually comes with some kind of SDK you need to implement. This means you're implementation will support listening barcode scannes only for this devices you implemented. Plus, it's not really cross platform friendly

And there's third way, simply listen for raw keyboard events and figure out what's barcode and what's not. Downside of this solution is that you need to figure out what's actual user interaction and what's barcode scan. Upside is it doesn't require any per manufacturer/device implementation and you're pretty much suporting all barcode scanners, including external ones with bluetooth or wifi. And it's cross platform friendly.

Implementation idea

All hardware barcode devices have few things in common

  • they act as a keyboard when barcode is scanned
  • all keyboard events are fired in extremly small time frame (less than 100 ms between each character)
  • barcode is terminated with special character (enter in majority)

So to figure out what is actual barcode and what is simple keyboard event that should be ignored this package uses following logic

  1. listen for physical keyboard raw key up event
  2. filter out only 'REAL' characters (ASCII codes lower than 256, without special characters except enter)
  3. on each new key check if previous key is older than bufferDuration, if it's older clear internal buffer.
  4. check if new key is enter key, if it is call onBarcodeScanned callback and clear buffer
  5. if it's not enter key just append it to internal buffer;

Basically it translates to: if you get bunch of keys comming really fast that end with enter key it's a BINGO.

Kategorien

Quell-Repository

Projekte, die dieses Paket verwenden

Noch keine Daten verfügbar.