multiplebarcode 0.0.21 copy "multiplebarcode: ^0.0.21" to clipboard
multiplebarcode: ^0.0.21 copied to clipboard

A Flutter Plugin For Read multiple barcodes and QR codes.

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:multiplebarcode/multiplebarcode.dart';

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

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

class _MyAppState extends State<MyApp> {
  String _scanCodes = "";

  Future<void> initPlatformState() async {
    String scanResults;
    try {
      scanResults = await Multiplebarcode.startScan(context);
    } on PlatformException { }

    if (!mounted) return;

    setState(() {
      _scanCodes = scanResults;
    });

  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(brightness: Brightness.dark),
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Multiple Scan example app'),
        ),
        body: Center(
          child: Column(
            children: <Widget>[
              Text('Scanned Codes are: $_scanCodes\n',style: TextStyle(fontSize: 18.0),),
              RaisedButton(child: Text("Scan"),onPressed: (){
                initPlatformState();
              } ,)
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
30
points
52
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter Plugin For Read multiple barcodes and QR codes.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on multiplebarcode

Packages that implement multiplebarcode