pointmobile_scanner_advanced 0.0.10 copy "pointmobile_scanner_advanced: ^0.0.10" to clipboard
pointmobile_scanner_advanced: ^0.0.10 copied to clipboard

PlatformAndroid

A Flutter plugin to manage Scanner for Pointmobile devices. You can scan barcodes, get barcode information and customize built-in scanner settings through code.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:pointmobile_scanner_advanced/pointmobile_scanner_advanced.dart';

void main() => runApp(const MyApp());

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    _runExampleScannerUtils();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Material App Bar'),
        ),
        body: const Center(
          child: Text('Hello World'),
        ),
      ),
    );
  }

  Future<void> _runExampleScannerUtils() async {
    if (!await PMScanner.isDevicePointMobile()) {
      return;
    }
    // INIT SCANNER FIRST
    await PMScanner.initScanner(resultType: ResultType.clipboardKeycodePaste);
    // await PMScanner.setDecodeMode(decodeMode: DecodeMode.fixedFocus);
    // await PMScanner.setBeepEnabled(beepEnabled: true);
    // await PMScanner.setCenterWindowTolerance(tolerance: 30);
    await PMUtils.listenClipboard();
    // final timeout = await PMScanner.getTriggerTimeout();
    // final decodeDelay = await PMScanner.getDecodeDelay();
    // final barcodeScanNumber = await PMScanner.getNumberOfBarcodesToScan();
    // await PMScanner.resetAllSettingsToDefault();

    /*
    IF YOU SET RESULTTYPE TO CLIPBOARDKEYCODEPASTE
    DO NOT FORGET TO LISTEN CLIPBOARD

     ----await PMUtils.listenClipboard(); ----
     
     */

    PMScanner.onDecode = _onDecode;
  }

  void _onDecode(Symbology symbology, String barcodeNumber) {
    print("$symbology --- $barcodeNumber");
  }
}
3
likes
150
points
47
downloads

Publisher

verified publisherkorayliman.com

Weekly Downloads

A Flutter plugin to manage Scanner for Pointmobile devices. You can scan barcodes, get barcode information and customize built-in scanner settings through code.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on pointmobile_scanner_advanced