Skip to main content

Installation

The Scanbot Barcode Scanner SDK Flutter Plugin is available on pub.dev as the barcode_scanner package. Follow the steps below to add it to your Flutter project.

Add the package

Include the barcode_scanner package in your pubspec.yaml file under dependencies:

dependencies:
barcode_scanner: ^5.1.0 # Use the latest version

Get the latest version from the Changelog.

Then, fetch and install the packages using the Flutter CLI or your IDE:

$ flutter pub get

Android

In the top-level android/build.gradle file:

  • Ensure the Kotlin version is set to 1.8.22 or higher. Typically, this is defined using the ext.kotlin_version variable:

    ...
    buildscript {
    ext.kotlin_version = '1.8.22'
    ...
    }
  • Add the following packagingOptions

      android {
    ...
    packagingOptions {
    pickFirst 'META-INF/atomicfu.kotlin_module'
    pickFirst 'META-INF/proguard/coroutines.pro'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/NOTICE'
    }
    }

iOS

In your ios/Podfile, ensure a global platform version is specified:

platform :ios, '13.0'

Navigate to the ios directory and install or update the Pods:

$ cd ios/
$ pod install

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get your free Trial License

What do you think of this documentation?


On this page

Scroll to top