Welcome to

Shenzhen Rakinda Technology Co., Ltd.

Official website!

Company News

Home > NEWS > Company News
Barcode Scanner in Flutter
Source:Powered | Author:admin | Time:2019-07-30 | Views:2269
Flutter is an open-source mobile application development framework created by Google. It is used to develop applications for Android and iOS, as well as being the primary method of creating applications for Google Fuchsia.

A flutter plugin for scanning 2D barcodes and QR codes. If you connect a small barcode scanner hardware with your handheld mobile computer, we can also use the flutter source code to send commands that trigger the scan function of barcode scanner and get the application running.



This provides a simple wrapper for two commonly used iOS and Android libraries.

Getting Started
Android
For Android, you must do the following before you can use the plugin:

Add the camera permission to your AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA" />
Add the BarcodeScanner activity to your AndroidManifest.xml. Do NOT modify the name.
<activity android:name="com.apptreesoftware.barcodescan.BarcodeScannerActivity"/>
This plugin is written in Kotlin. Therefore, you need to add Kotlin support to your project. See installing the Kotlin plugin.
Edit your project-level build. Gradle file to look like this:
buildscript {
    ext.kotlin_version = '1.3.21'
    ...
    dependencies {
        ...
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
...
Edit your app-level build.gradle file to look like this:
apply plugin: 'kotlin-android'
...
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    ...
}
Now you can depend on the barcode_scan plugin in your pubspec.yaml file:

dependencies:
  ...
  barcode_scan: any
Click "Packages get" in Android Studio or run flutter packages get in your project folder.

iOS
To use on iOS, you must add the the camera usage description to your Info.plist
<key>NSCameraUsageDescription</key>
<string>Camera permission is required for barcode scanning.</string>

Barcode scanner for Android is widely used in warehouse, logistics, manufacturing, etc. It will not any problem to work all day long with the high battery capacity.

Contact Us:

If you want to know more information? Please fill in the following message form, we will contact you in the first time.

Name:
Tel:
Email:
Country:
Content:
(We will never, ever spam you – nor sell, trade, or transfer your email to anyone else.)
 
Tech Support