qrcode_barcode_scanner 2.0.1 copy "qrcode_barcode_scanner: ^2.0.1" to clipboard
qrcode_barcode_scanner: ^2.0.1 copied to clipboard

PlatformAndroid

Plugins to manage the reading of QR code or barcode from an external device as a keyboard.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

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

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

class _MyAppState extends State<MyApp> {
  String? _scanValue;

  @override
  void initState() {
    super.initState();
    QrcodeBarcodeScanner(
      onScannedCallback: (String value) => setState(
        () {
          _scanValue = value;
        },
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Scan value: ${_scanValue ?? "none"}'),
        ),
      ),
    );
  }
}
7
likes
150
pub points
85%
popularity

Publisher

verified publisherfrancescodema.dev

Plugins to manage the reading of QR code or barcode from an external device as a keyboard.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on qrcode_barcode_scanner