Flutter

Flutter Barcode Scanner SDK

Add barcode and QR code scanning to Flutter apps for Android and iOS with one plugin. barKoder reads 1D and 2D formats, supports continuous scanning and Batch MultiScan, and decodes damaged barcodes, VIN, MRZ, PDF417 and DPM codes.

flutter barcode scanner

barKoder Barcode Scanner SDK for Flutter

The barKoder Flutter plugin connects your Dart code to barKoder's native scanning engine on Android and iOS. You build the scanner screen once and ship it to both platforms. The official plugin, barkoder_flutter, is published as the barKoder Flutter plugin on pub.dev.

What the Flutter barcode SDK reads

  • 30+ 1D and 2D symbologies
  • QR Code and Micro QR Code
  • Damaged and blurry barcodes
  • Deformed 1D barcodes
  • Batch MultiScan
  • Continuous scanning
  • VIN barcodes
  • MRZ on passports and IDs
  • PDF417 on licenses and IDs
  • DPM Data Matrix
  • DotCode
  • Barcodes in gallery images

Test it on the barcodes your users actually scan. A trial license runs for 30 days on up to 25 devices.

Start a free trial

Add a Flutter barcode scanner to your app

  1. Add barkoder_flutter to the dependencies in pubspec.yaml and run flutter pub get.
  2. Import the package and place a BarkoderView in your layout with your license key.
  3. In the onBarkoderViewCreated callback, enable the barcode types you need.
  4. Call startScanning and handle the result in its callback.
  5. On iOS, add a camera usage description to Info.plist. The plugin sets the Android camera permission for you.
Open the Flutter installation guide

Flutter barcode scanner example

The minimum code to scan a QR code, copied from the barKoder Flutter installation guide. The current version of barkoder_flutter on pub.dev is 1.7.2.

1. Add the package to pubspec.yaml
YAML
dependencies:
    flutter:
      sdk: flutter

    barkoder_flutter: <package version>
2. Import it in your Dart file
Dart
import 'package:barkoder_flutter/barkoder_flutter.dart';
3. Add BarkoderView with your license key
Dart
@override
  Widget build(BuildContext context) {
    return Scaffold(
      ...,
      body: BarkoderView(
                licenseKey: 'KEY',
                onBarkoderViewCreated: _onBarkoderViewCreated),
      ...
    );
4. Configure the scanner and start scanning
Dart
void _onBarkoderViewCreated(barkoder) {
  _barkoder = barkoder;

  _barkoder.setBarcodeTypeEnabled(BarcodeType.qr, true);
  _barkoder.setRegionOfInterestVisible(true);

  ...
}

void _scanPressed() {
  _barkoder.startScanning((result) {
    // The result from successful scan is received here
    print(result.decoderResults[0].textualData);
  });
}
5. iOS camera permission in Info.plist
XML
<key>NSCameraUsageDescription</key>
 <string>Camera permission</string>

For a complete screen with start and stop buttons, see the Flutter general example. Every method is listed in the Flutter API reference.

A Flutter barcode reader for difficult codes

Each feature below is documented for Flutter. Where the docs give a one-line setting, it is shown here so you can paste it into your onBarkoderViewCreated callback.

Damaged, deformed and blurry barcodes

MatrixSight®, Segment Decoding, DeBlur

MatrixSight reads QR and Data Matrix codes that are missing their finder, timing or alignment patterns, and even part of their data. Segment Decoding reads 1D barcodes deformed on bottles, test tubes and other curved surfaces. DeBlur reads EAN and UPC barcodes affected by motion, lens or focus blur.

How MatrixSight reads damaged codes →

Batch MultiScan and continuous scanning

Many barcodes in one session

Scan multiple barcodes of any type and density continuously. Result caching and location reconstruction keep the results stable while the camera moves.

Dart
_barkoder.setCloseSessionOnResultEnabled(false);
_barkoder.setMulticodeCachingDuration(3000);
_barkoder.setMulticodeCachingEnabled(true);
_barkoder.setMaximumResultsCount(200);
Enable MultiScan in Flutter →

MRZ scanning

Passports, ID cards and travel documents

Read the Machine Readable Zone on identity documents. MRZ scanning runs locally on the device in real time.

Dart
_barkoder.setBarcodeTypeEnabled(BarcodeType.idDocument, true);
Enable MRZ mode in Flutter →

VIN scanning

Code 39, Code 128, QR Code and Data Matrix

VIN mode combines MatrixSight and Segment Decoding to read the barcodes that carry Vehicle Identification Numbers. OCR VIN support is documented separately.

Dart
_barkoder.setEnableVINRestrictions(true);
Enable VIN scanning in Flutter →

PDF417 on licenses and ID cards

PDF417-LineSight® and the SA DL parser

LineSight reads PDF417 barcodes that are missing their start and stop patterns, row indicators or even whole data columns. For South African driving licenses, ID cards and vehicle license discs, the SA DL parser turns the barcode into structured fields on the device.

Enable the South African parsers in Flutter →

DPM Data Matrix

Direct Part Marking

DPM mode is a scanning template for Data Matrix codes engraved or etched onto parts, built for low contrast, poor lighting and surface damage.

See the Flutter DPM example →

Flutter QR code scanner

If you mainly need a Flutter QR scanner, the same plugin covers it. Enable BarcodeType.qr, as in the example above, and add other formats when your app needs them.

QR scanning with the Flutter QR code scanner SDK

  • Reads QR Code and Micro QR Code
  • Reads damaged QR codes with MatrixSight
  • Scans many QR codes in one pass with Batch MultiScan
  • Scans QR codes and barcodes from gallery images
  • Shows data over scanned codes with AR Mode
Enable gallery scanning in Flutter

Supported barcode formats

1D: Codabar, Code 11, Code 25, Code 32, Code 39, Code 93, Code 128, DataBar, EAN-8, EAN-13, GS1 Composite, Interleaved 2 of 5, ITF-14, MSI Plessey, Postal Barcodes, Telepen, UPC-A and UPC-E.

2D: Aztec Code, Aztec Compact, Data Matrix, PDF417, MaxiCode, Micro PDF417, DotCode, QR Code and Micro QR Code.

Browse all barcode types

mobile_scanner or a commercial barcode scanner: Flutter options compared

Many Flutter teams start with mobile_scanner, a free open-source package. It is a good choice for many apps. Here is how to decide whether you need a commercial barcode scanner for Flutter like barKoder.

mobile_scanner fits when

  • You want a free, BSD-licensed package
  • Your codes are clean QR codes or common retail barcodes
  • The platform scanners it uses (ML Kit on Android, Apple Vision on iOS) read your samples well
  • You also need web, macOS or a quick prototype

barKoder fits when

  • Labels are damaged, wrinkled, blurred or on curved surfaces
  • You read dense PDF417 on licenses and ID cards
  • You scan DPM codes engraved on parts
  • You need MRZ or VIN scanning in the same plugin
  • You count many barcodes at once with Batch MultiScan
  • You need formats such as DotCode, Telepen or MSI Plessey
  • You want direct developer support from the team that builds the engine

The simplest test: run both on the same samples and devices, and count failed and repeated scans as well as successful reads.

Requirements and documentation

What you need

  • Flutter 3.7.2 or later
  • Android 5.0 (API 21) or later
  • iOS 15.0 or later
  • A Mac with Xcode to build the iOS app
  • A barKoder license key. Without one, scan results come back marked (Unlicensed) and only partly readable.

One scanning engine for Flutter and every other platform

The same barKoder engine is available as native SDKs for Android and iOS and as plugins for other cross-platform frameworks, so you can reuse the setup across your apps.

  • 7 native & desktop SDKs
  • 6 cross-platform integrations
  • One consistent scanning core

barKoder in production

Teams that moved from other scanners to barKoder, including a Flutter app that replaced a free scanning package.

Box2box Storage

Spain · Logistics

Replaced a free Flutter barcode-scanning tool that produced more errors than correct scans. The team now trusts scan results without manual checks.

barKoder is a reliable product with an easy integration, the best solution we could find on the market.Sander van Steijn, Cofounder & COO
Read the Box2box story →

INEXTO

Switzerland · Manufacturing & Logistics

Uses barKoder for factory and logistics track and trace, with DPM codes on Zebra TC mobile computers. Names Flutter and MAUI among the platforms that mattered.

barKoder offers a major advantage with its broad platform support and outperforms other competitor solutions.Nicolas Schaefer, Head of R&D
Read the INEXTO story →

Try barKoder on your phone or in your browser

Install the free barKoder demo app, or open the web demo, and scan your own barcodes before you integrate the SDK.

iPhone and iPad

barKoder demo app for iOS

Scan with your camera, or point it at the QR code to open the App Store.

Download on the App Store
QR code linking to the barKoder demo app on the App Store

Android phones and tablets

barKoder demo app for Android

Scan with your camera, or point it at the QR code to open Google Play.

Get it on Google Play
QR code linking to the barKoder demo app on Google Play

Any modern browser

barKoder web demo

Runs the Web SDK in your browser, on desktop or mobile, with nothing to install.

Open the web demo
QR code linking to the barKoder web demo

Test with known samples. Print or display the testing sheet and scan each 1D and 2D barcode with the demo app. The data sheet summarizes the SDK for your team.

Flutter barcode scanner questions

What is the best barcode scanning SDK for Flutter apps?

It depends on what you scan. For clean QR codes and retail barcodes, a free package such as mobile_scanner may be enough. If your users scan damaged labels, dense PDF417, DPM marks, MRZ or VIN, or many barcodes at once, test a commercial Flutter barcode scanner SDK such as barKoder on your own samples with a free trial license.

Is the barKoder Flutter plugin on pub.dev?

Yes. The package is barkoder_flutter, published by barkoder.com as a verified publisher. Add it to pubspec.yaml and run flutter pub get, as described in the Flutter installation guide.

How is barKoder different from mobile_scanner?

mobile_scanner is a free package built on the platform scanners: ML Kit on Android and Apple Vision on iOS. barKoder uses its own engine, with MatrixSight, Segment Decoding, DeBlur and PDF417-LineSight for damaged codes, plus MRZ, VIN, DPM and Batch MultiScan modes and developer support. barKoder needs a commercial license; see pricing.

Can I scan QR codes and barcodes from images in Flutter?

Yes. Besides live camera scanning, the plugin can scan an image your user picks from the gallery. See how to enable gallery scan in Flutter.

Does the Flutter barcode scanner work offline?

Scanning runs locally on the device. The SDK goes online only for the license check, and each device must reach the licensing server at least once every 30 days.

What happens if I run the SDK without a license key?

The scanner still works, but results come back marked (Unlicensed) and only partly readable. Register on the barKoder portal to generate a trial license, which runs for 30 days on up to 25 devices. Use trial licenses in development and staging only.

Which Flutter, Android and iOS versions are supported?

barkoder_flutter requires Flutter 3.7.2 or later, Android 5.0 (API 21) or later and iOS 15.0 or later.

Is there a demo app I can try first?

Yes. The Barcode Scanner by barKoder app shows the supported formats and includes a DPM scanning template. Get it on the App Store or Google Play.

Add barcode scanning to your Flutter app

Test barKoder on your own barcodes and devices with a free 30-day trial, or talk to an SDK expert about your project.