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

discontinued
outdated

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
40
pub points
0%
popularity

Publisher

unverified uploader

Flutter plugin for displaying live camera with barcode scanner.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

camera, firebase_ml_vision, flutter

More

Packages that depend on live_barcode_scanner