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.

example/example.md

scan_tally_mobile_scanner example #

A full app (camera tab, handheld scanner tab, count list with undo, GS1 view) lives in packages/scan_tally/example.

import 'package:flutter/material.dart';
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';

class CountScreen extends StatefulWidget {
  const CountScreen({super.key});

  @override
  State<CountScreen> createState() => _CountScreenState();
}

class _CountScreenState extends State<CountScreen> {
  final controller = MobileScannerSource.createController();
  final session = ScanSession(
    confirmation: const FrameConfirmation(frames: 2),
    feedbackPlayer: const FlutterScanFeedbackPlayer(),
  );

  @override
  void initState() {
    super.initState();
    session.attach(MobileScannerSource(controller));
  }

  @override
  void dispose() {
    session.dispose();
    controller.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) => Scaffold(
    body: ScanFlash(
      session: session,
      child: Column(
        children: [
          Expanded(child: MobileScanner(controller: controller)),
          Expanded(
            child: ScanSessionBuilder(
              session: session,
              builder: (context, session) => ListView(
                children: [
                  for (final e in session.entries) ListTile(title: Text(e.key), trailing: Text('${e.quantity}')),
                ],
              ),
            ),
          ),
        ],
      ),
    ),
    floatingActionButton: FloatingActionButton(onPressed: session.undoLast, child: const Icon(Icons.undo)),
  );
}
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