Skip to main content

scan_tally_mobile_scanner 0.1.0 copy "scan_tally_mobile_scanner: ^0.1.0" to clipboard
scan_tally_mobile_scanner: ^0.1.0 copied to clipboard

mobile_scanner camera adapter for scan_tally: continuous barcode counting with duplicate filtering, frame confirmation, undo and GS1 parsing.

scan_tally_mobile_scanner #

Camera adapter that connects mobile_scanner to scan_tally. With it, a camera counts items the way a stock count needs:

  • each item counts once while it stays in view;
  • it counts again after it leaves the view and comes back (or after a cooldown);
  • blurry misreads are filtered by N-frame confirmation;
  • you get undo, a validator, GS1 parsing and feedback from scan_tally.

Türkçe açıklama aşağıda.

Installation #

dependencies:
  scan_tally: ^0.1.0
  scan_tally_mobile_scanner: ^0.1.0
  mobile_scanner: ^7.3.0

Follow the platform setup of mobile_scanner (camera permission text on iOS/macOS).

Usage #

import 'package:mobile_scanner/mobile_scanner.dart';
import 'package:scan_tally/scan_tally_flutter.dart';
import 'package:scan_tally_mobile_scanner/scan_tally_mobile_scanner.dart';

final controller = MobileScannerSource.createController();
final session = ScanSession(
  dedupe: const DedupePolicy.leaveAndReturn(),
  confirmation: const FrameConfirmation(frames: 2),
  feedbackPlayer: const FlutterScanFeedbackPlayer(),
);
session.attach(MobileScannerSource(controller));

// build:
ScanFlash(session: session, child: MobileScanner(controller: controller));

createController() returns a controller with DetectionSpeed.normal and a detection timeout of 150 ms, so a code in view is reported about every 150 ms.

Do not use DetectionSpeed.noDuplicates. It hides the repeated reads that scan_tally needs to know a code is still in view, so leave-and-return counting and frame confirmation stop working.

If you already use MobileScanner(onDetect: ...), feed the captures to MobileScannerSource.fromCaptures(stream) instead.

Each BarcodeCapture becomes one continuous ScanFrame. BarcodeFormat is mapped to ScanSymbology, so EAN/UPC codes get check-digit validation. Errors on the controller stream are skipped.

Compatibility #

scan_tally_mobile_scanner mobile_scanner scan_tally Flutter
0.1.x >=7.3.0 <8.0.0 (developed with 7.4.2, analyzed and tested against 7.3.0) ^0.1.0 ≥ 3.32

mobile_scanner 7.0–7.2 lack some BarcodeFormat values this adapter maps, so 7.3.0 is the lower bound. A new major version of mobile_scanner gets a new adapter release after testing.

Why a separate package? #

  • The core scan_tally has no camera dependency. Apps that only use hardware (keyboard wedge) scanners do not ship a camera plugin, ML Kit or the camera permission.
  • Camera plugin API changes only touch this small adapter.
  • To connect another scanner plugin, implement ScanSource (a Stream<ScanFrame>) the same way; see mobile_scanner_source.dart.

Status #

Compiled and unit tested with simulated captures. In this release it has not yet been tried on a physical device.

License #

MIT


Türkçe #

mobile_scanner paketini scan_tally'ye bağlayan ince kamera adaptörü. Kamerayla stok sayımına uygun şekilde sayım yapılır:

  • her ürün görüntüde kaldığı sürece bir kez sayılır;
  • görüntüden çıkıp geri gelince (ya da bekleme süresi dolunca) yeniden sayılır;
  • bulanık görüntüden gelen yanlış okumalar art arda N kare şartıyla ayıklanır;
  • geri alma, doğrulama, GS1 çözümleme ve geri bildirim scan_tally'den gelir.

Kullanım #

Kod örneği yukarıdaki İngilizce bölümdedir.

  • MobileScannerSource.createController() önerilen ayarlarla bir denetleyici döndürür: DetectionSpeed.normal ve 150 ms algılama aralığı.
  • DetectionSpeed.noDuplicates kullanmayın. Bu mod, kodun hâlâ görüntüde olduğunu anlamak için gereken tekrar okumaları gizler.
  • MobileScanner(onDetect: ...) kullanıyorsanız yakalamaları MobileScannerSource.fromCaptures(stream) ile verin.

Uyumluluk #

  • scan_tally_mobile_scanner 0.1.x, mobile_scanner >=7.3.0 <8.0.0 ile çalışır.
    • 7.4.2 ile geliştirildi; 7.3.0'a karşı analiz edildi ve test edildi.
    • 7.0–7.2'de bu adaptörün eşlediği bazı BarcodeFormat değerleri yok.
  • Yeni bir ana mobile_scanner sürümü, test edildikten sonra yeni bir adaptör sürümüyle desteklenir.

Neden ayrı paket? #

  • Çekirdek paketin kamera bağımlılığı yoktur. Yalnızca el terminali kullanan bir uygulama kamera eklentisi, ML Kit ve kamera izni taşımaz.
  • Kamera eklentisindeki API değişiklikleri yalnızca bu küçük adaptörü etkiler.
  • Başka bir tarayıcı paketini bağlamak için ScanSource arayüzünü aynı şekilde uygulayın.

Durum #

Derlendi ve benzetilmiş yakalamalarla birim testlerinden geçti. Bu sürümde fiziksel cihazda henüz denenmedi.

Lisans #

MIT

0
likes
160
points
--
downloads

Documentation

API reference

Publisher

verified publisherabdurrahmankaraoglu.com

Weekly Downloads

mobile_scanner camera adapter for scan_tally: continuous barcode counting with duplicate filtering, frame confirmation, undo and GS1 parsing.

Homepage
Repository (GitHub)
View/report issues

Topics

#barcode #scanner #inventory #camera #mobile-scanner

License

MIT (license)

Dependencies

flutter, mobile_scanner, scan_tally

More

Packages that depend on scan_tally_mobile_scanner