flutter_scan_barcode 0.0.1 copy "flutter_scan_barcode: ^0.0.1" to clipboard
flutter_scan_barcode: ^0.0.1 copied to clipboard

A plugin for barcode scanning support on Android and iOS. Supports barcodes, QR codes, etc.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_barcode_scan/flutter_barcode_scan.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
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Column(
          children: [
            ListTile(
              title: const Text('Open Scan Barcode'),
              onTap: () {
                FlutterBarcodeScan.scanBarcode(
                  "#ff6666",
                  "Cancelar",
                  true,
                  ScanMode.BARCODE,
                );
              },
            ),
            ListTile(
              title: const Text('Open Scan QRCode'),
              onTap: () {
                FlutterBarcodeScan.scanBarcode(
                  "#ff6666",
                  "Cancelar",
                  true,
                  ScanMode.QR,
                );
              },
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
150
points
28
downloads

Publisher

unverified uploader

Weekly Downloads

A plugin for barcode scanning support on Android and iOS. Supports barcodes, QR codes, etc.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

flutter, flutter_plugin_android_lifecycle, plugin_platform_interface

More

Packages that depend on flutter_scan_barcode