# Scanbot Flutter Barcode Scanner SDK

## Table of contents

- [Scanbot Flutter Barcode Scanner SDK](#scanbot-flutter-barcode-scanner-sdk)
  - [Table of contents](#table-of-contents)
  - [About the Scanbot Barcode Scanner SDK](#about-the-scanbot-barcode-scanner-sdk)
    - [Supported barcode types](#supported-barcode-types)
    - [Changelog](#changelog)
  - [How to use the SDK](#how-to-use-the-sdk)
    - [Installation](#installation)
      - [Requirements](#requirements)
      - [Install steps](#install-steps)
      - [Camera permissions](#camera-permissions)
        - [Android](#android)
        - [iOS](#ios)
      - [SDK initialization](#sdk-initialization)
    - [Barcode scanner setup](#barcode-scanner-setup)
      - [Scanning modes](#scanning-modes)
        - [Single Scanning](#single-scanning)
        - [Multi Scanning](#multi-scanning)
        - [Find \& Pick](#find--pick)
      - [Configuration options](#configuration-options)
        - [Barcode filters](#barcode-filters)
        - [AR overlay](#ar-overlay)
        - [Barcode parsers](#barcode-parsers)
        - [Scanning barcodes from an image](#scanning-barcodes-from-an-image)
      - [UI customization](#ui-customization)
  - [Additional information](#additional-information)
    - [Trial license](#trial-license)
    - [Free developer support](#free-developer-support)
    - [Guides and tutorials](#guides-and-tutorials)
  
## About the Scanbot Barcode Scanner SDK

The Scanbot [Barcode Scanner SDK](https://scanbot.io/barcode-scanner-sdk/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites) provides intuitive APIs to integrate fast, reliable barcode scanning into your Flutter app.

It works entirely offline and scans barcodes in 0.04 seconds, even in challenging conditions like poor lighting or with damaged codes.

💡 For more details, check out our [documentation](https://docs.scanbot.io/flutter/barcode-scanner-sdk/introduction/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites) or see our [example app](https://github.com/doo/scanbot-barcode-scanner-sdk-example-flutter).

### Supported barcode types

Our library supports all common 1D and 2D barcodes and multiple postal symbologies, including:

| Barcode type       | Symbologies        |
|:-------------------|: |
| 1D Barcodes        | [EAN](https://scanbot.io/barcode-scanner-sdk/ean/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [UPC](https://scanbot.io/barcode-scanner-sdk/upc/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [Code 128](https://scanbot.io/barcode-scanner-sdk/code-128/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [GS1-128](https://scanbot.io/barcode-scanner-sdk/gs1-128/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [Code 39](https://scanbot.io/barcode-scanner-sdk/code-39/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [Codabar](https://scanbot.io/barcode-scanner-sdk/codabar/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [ITF](https://scanbot.io/barcode-scanner-sdk/itf-code/), Code 25, Code 32, Code 93, Code 11, MSI Plessey, Standard 2 of 5, IATA 2 of 5, Databar (RSS), GS1 Composite                                                                                                                                                                                                                         |
| 2D Barcodes        | [QR Code](https://scanbot.io/glossary/qr-code/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [Micro QR Code](https://scanbot.io/barcode-scanner-sdk/micro-qr-code/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [Aztec Code](https://scanbot.io/barcode-scanner-sdk/aztec-code/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [PDF417 Code](https://scanbot.io/barcode-scanner-sdk/pdf417/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [Data Matrix Code](https://scanbot.io/barcode-scanner-sdk/data-matrix/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [GiroCode](https://scanbot.io/glossary/giro-code/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [PPN](https://scanbot.io/glossary/ppn/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [UDI](https://scanbot.io/glossary/udi/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), [Royal Mail Mailmark](https://scanbot.io/barcode-scanner-sdk/royal-mail/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites), MaxiCode |
| Postal Symbologies | USPS Intelligent Mail Barcode (IMb), RM4SCC Barcode and Mailmark, Australia Post 4-State Customer Code, Japan Post 4-State Customer Code, KIX    |

💡 Please visit our [docs](https://docs.scanbot.io/flutter/barcode-scanner-sdk/supported-barcodes/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites) for a complete overview of the supported barcode symbologies.

### Changelog

For a detailed list of changes in each version, see the [changelog](https://docs.scanbot.io/flutter/barcode-scanner-sdk/changelog/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites).

## How to use the SDK

### Installation

#### Requirements

Check out our [documentation](https://docs.scanbot.io/flutter/barcode-scanner-sdk/introduction/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites#requirements) for a full overview of our SDK's requirements.

#### Install steps

Install the Scanbot Barcode Scanner SDK module by running the following command in your terminal or through your IDE:

```bash
$ flutter pub add barcode_scanner
```

💡 See our [full installation guide](https://docs.scanbot.io/flutter/barcode-scanner-sdk/detailed-setup-guide/installation/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites) for complete details.

#### Camera permissions

Our SDK needs camera access to scan from a live camera stream.

##### Android

Add these camera permissions to your **android/app/src/main/AndroidManifest.xml**:

```xml
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
```

We added the uses-feature tag for better recognition in the Google Play Store ([learn more](https://developer.android.com/guide/topics/manifest/uses-feature-element)). Our Ready-to-Use UI Components handle runtime permissions automatically.

##### iOS

Add this camera permission description to **ios/{projectName}/Info.plist** inside the <dict> element:

```xml
<key>NSCameraUsageDescription</key>
<string>Camera permission is needed to scan barcodes</string>
```

#### SDK initialization

Initialize the SDK before using any features, ideally when your app launches.

Add this import to the top of your file:

```dart
import 'package:barcode_scanner/scanbot_barcode_sdk.dart';
```

Initialize the SDK with:

```dart
var config = ScanbotSdkConfig(
  licenseKey: "<YOUR_SCANBOT_SDK_LICENSE_KEY>",
  loggingEnabled: true,
);

ScanbotBarcodeSdk.initScanbotSdk(config);
```

💡 You can test the SDK without a license key for 60 seconds per app session. Need longer testing? Get your [free trial license key](https://docs.scanbot.io/trial/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites).

### Barcode scanner setup

#### Scanning modes

In our ready-to-use UI, the Scanbot Barcode Scanner SDK offers the following scan modes right-out-of-the-box.

##### [Single Scanning](https://docs.scanbot.io/flutter/barcode-scanner-sdk/barcode-scanner/ready-to-use-ui/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites#launching-the-rtu-ui-barcode-scanner)

This is the default scanning mode. It is optimized for detecting a single barcode at a time.

```dart
// Create the default configuration object.
var configuration = BarcodeScannerScreenConfiguration();

// Initialize the use case for single scanning.
var scanningMode = SingleScanningMode();

configuration.useCase = scanningMode;

var result = await ScanbotBarcodeSdk.startBarcodeScanner(configuration);
```

<p align="left">
  <img src="https://scanbot.io/wp-content/uploads/2025/04/single-barcode-scanning-gif.gif" width="33.3%" />
</p>

##### [Multi Scanning](https://docs.scanbot.io/flutter/barcode-scanner-sdk/barcode-scanner/ready-to-use-ui/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites#multiple-scanning)

The barcode scanner can also be configured to scan multiple barcodes in one go without closing the scanning screen. It can also count the scanned items.

```dart
// Create the default configuration object.
var configuration = BarcodeScannerScreenConfiguration();

// Initialize the use case for continuous scanning.
var scanningMode = MultipleScanningMode();
configuration.useCase = scanningMode;

return configuration;
```

<p align="left">
  <img src="https://scanbot.io/wp-content/uploads/2025/04/gif-multi-scanning.gif" width="33.3%"/>
</p>

##### [Find & Pick](https://docs.scanbot.io/flutter/barcode-scanner-sdk/barcode-scanner/ready-to-use-ui/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites#find-and-pick-scanning)

Given one or more barcodes, the SDK visually highlights and scans the correct items for your users. It automatically selects the barcode with the right barcode value from your camera feed.

```dart
// Create the default configuration object.
var configuration = BarcodeScannerScreenConfiguration();

// Initialize the use case for multiple scanning.
var scanningMode = FindAndPickScanningMode();

// Set the expected barcodes.
scanningMode.expectedBarcodes = [
  ExpectedBarcode(
      barcodeValue: "123456",
      title: "numeric barcode",
      image:
          "https://avatars.githubusercontent.com/u/1454920",
      count: 4),
  ExpectedBarcode(
      barcodeValue: "SCANBOT",
      title: "value barcode",
      image:
          "https://avatars.githubusercontent.com/u/1454920",
      count: 3)
];

configuration.useCase = scanningMode;

return configuration;
```

<p align="left">
  <img src="https://scanbot.io/wp-content/uploads/2025/04/find-and-pick-barcode-scanning-gif.gif" width="33.3%"/>
</p>

#### Configuration options

The Scanbot Flutter Barcode Scanner Plugin offers numerous configuration options:

##### Barcode filters

Apply filters by barcode type or content, with regex pattern support to capture only relevant barcodes. 

##### [AR overlay](https://docs.scanbot.io/flutter/barcode-scanner-sdk/barcode-scanner/ready-to-use-ui/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites#ar-overlay)

Optional feature providing real-time barcode highlighting, preview, and tap-to-select functionality. Recognized barcodes are highlighted with customizable frames and text.

##### [Barcode parsers](https://docs.scanbot.io/flutter/barcode-scanner-sdk/supported-barcodes/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites#data-parsers)

Extract structured information from 2D barcodes like QR and Data Matrix codes. These include parsers for documents such as driving licenses (AAMVA), boarding passes, medical certificates, SEPA forms, Swiss QR codes, and vCard business cards.

##### [Scanning barcodes from an image](https://docs.scanbot.io/flutter/barcode-scanner-sdk/barcode-scanner/stable-detection/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites)

Detect barcodes from still images in JPG or other formats, with support for single and multi-image detection.

#### UI customization

Customize the UI to match your app's look and feel. Please refer to our [documentation](https://docs.scanbot.io/flutter/barcode-scanner-sdk/barcode-scanner/ready-to-use-ui/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites#change-the-visuals-to-suit-your-needs) for a full overview of the visual configuration options.

* **Configuring UI elements:** Tailor interface elements with custom guidance text, enable or disable the Top Bar, or configure the Action Bar with features like Flashlight and Zoom buttons.

* **Palette:** Configure your UI's color palette to match your brand design for a cohesive user experience.

* **Localization:** Easily localize strings displayed on buttons, labels, and text fields.

```dart
// Example for configuring the Scanbot SDK's UI customization options

/**
 * Instantiate a configuration object of BarcodeScannerScreenConfiguration and
 * start the barcode scanner with the configuration
 */
var config = BarcodeScannerScreenConfiguration();

// Configure localization parameters.
config.localization.cameraPermissionCloseButton = "Custom close title";

// Adjusting the text for your user guidance
config.userGuidance.title.text = "Please hold your camera over the barcode";

// Changing the color palette
config.palette.sbColorPrimary = ScanbotColor('#000000');
config.palette.sbColorNegative = ScanbotColor('#ff3737');

return config;
```

## Additional information

### Trial license

The Scanbot SDK will run for one minute per session without a license. After that, all functionalities and UI components will stop working. 

To try the Flutter Barcode Scanner SDK without the one-minute limit, you can request a free, no-strings-attached [7-day trial license](https://docs.scanbot.io/trial/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites).

Our pricing model is simple: Unlimited barcode scanning for a flat annual license fee, full support included. There are no tiers, usage charges, or extra fees. [Contact our team](https://scanbot.io/contact-sales/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites) to receive your quote.

### Free developer support

Need help integrating or testing our Barcode Scanner SDK in your Flutter project? We offer [free developer support](https://docs.scanbot.io/support/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites) via Slack, MS Teams, or email.

As a customer, you also get access to a dedicated support Slack or Microsoft Teams channel to talk directly to your Customer Success Manager and our engineers.

### Guides and tutorials

Do you want to enable your app to scan barcodes or QR codes? Integrating the Scanbot Flutter Barcode Scanner plugin into your mobile app takes just a few minutes.

💡 Our [Flutter Barcode Scanner tutorial](https://scanbot.io/techblog/flutter-barcode-scanner-package-tutorial/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites) walks you through the integration process step by step. Follow along to implement a powerful QR code scanner feature quickly.

Alternatively, check out our [developer blog](https://scanbot.io/techblog/?utm_source=pub.dev&utm_medium=referral&utm_campaign=dev_sites) for a collection of in-depth tutorials, use cases, and best practices.