6 Best Barcode and QR Packages for Flutter

Barcode and QR code scanning are essential features for many mobile applications, ranging from inventory management to e-commerce.

The following are the best Flutter libraries for generating and scanning barcodes:

Create barcode


barcode is a Dart library that can generate generic drawing operations. It is the base to create flutter widgets or pdf barcodes. There are many packages that depend on this package to generate PDF and SVG barcodes.

// Create a DataMatrix barcode
final dm = Barcode.dataMatrix();

final me = MeCard.wifi(
  ssid: 'My Neighbor Wifi ',
  password: 'somelongpasswith12345',

// Generate a SVG with a barcode that configures the wifi access
final svg = bc.toSvg(me.toString(), width: 300, height: 300);

// Save the image
await File('neighbor_wifi.svg').writeAsString(svg);

It supports both 1D and 2D barcodes.


This widget uses pub:barcode (the library above) to generate any supported barcodes.

  barcode: Barcode.ean13(),
  data: 'EAN14 format product code data',
  errorBuilder: (context, error) => Center(child: Text(error)),

Scan barcode


This is a barcode scanning package that supports the scanning of 1D barcodes, and QR codes on Android and iOS.

String barcodeScanRes = await FlutterBarcodeScanner.scanBarcode(


This is a simple plugin to scan for QR codes. It supports scanning BR-CODE or QR-CODE.

import 'package:qrscan/qrscan.dart' as scanner;

String cameraScanResult = await scanner.scan();


QR.Flutter is a Flutter library for simple and fast QR code rendering via a Widget or custom painter.

  data: "22345678910",
  version: QrVersions.auto,
  size: 300.0,


This is a QR code scanner that can be embedded inside Flutter that works on both iOS and Android.

class _QRViewExampleState extends State<QRViewExample> {
  final GlobalKey qrKey = GlobalKey(debugLabel: 'QR');
  var qrText = "";
  QRViewController controller;

  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: <Widget>[
            flex: 5,
            child: QRView(
              key: qrKey,
              onQRViewCreated: _onQRViewCreated,
            flex: 1,
            child: Center(
              child: Text('Scan result: $qrText'),

  void _onQRViewCreated(QRViewController controller) {
    this.controller = controller;
    controller.scannedDataStream.listen((scanData) {
      setState(() {
        qrText = scanData;

  void dispose() {

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.