live_barcode_scanner 0.0.1+1

Flutter Android iOS

Flutter plugin for displaying live camera with barcode scanner.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:live_barcode_scanner/live_barcode_scanner.dart';

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

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool _preview = false;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Live Barcode Scanner"),
        ),
        floatingActionButton: FloatingActionButton(
          child: Text("scan"),
          onPressed: () {
            setState(() {
              _preview = !_preview;
            });
          },
        ),
        body: _preview ? LiveBarcodeScanner(
          onBarcode: (code) {
            print(code);

            return true;
          },
         ) : null,
      ),
    );
  }
}
0
likes
90
pub points
48%
popularity

Flutter plugin for displaying live camera with barcode scanner.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

marian.skripp@gmail.com

License

BSD (LICENSE)

Dependencies

camera, firebase_ml_vision, flutter

More

Packages that depend on live_barcode_scanner