ml_kit_live_barcode_scanner 0.0.2 copy "ml_kit_live_barcode_scanner: ^0.0.2" to clipboard
ml_kit_live_barcode_scanner: ^0.0.2 copied to clipboard

A flutter plugin that scan barcode and Qr Code works on ios and android

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(home: HomePage());
  }
}

class HomePage extends StatelessWidget {
  HomePage({super.key});
  final controller = LiveBarcodeScannerController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Live Barcode Scanner')),
      body: Column(
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: [
              ElevatedButton(
                onPressed: () {
                  controller.showBarCodeScanner(context, (result) {
                    debugPrint("Result: $result");
                  }, () {});
                },
                child: Text("Start"),
              ),
            ],
          ),
        ],
      ),
    );
  }
}
1
likes
135
points
0
downloads

Publisher

verified publisheryoussefaouadni.online

Weekly Downloads

A flutter plugin that scan barcode and Qr Code works on ios and android

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, permission_handler, plugin_platform_interface

More

Packages that depend on ml_kit_live_barcode_scanner

Packages that implement ml_kit_live_barcode_scanner