All Projects → mono0926 → barcode_scan2

mono0926 / barcode_scan2

Licence: MIT license
[reborned barcode_scan] A flutter plugin for reading 2D barcodes and QR codes.

Programming Languages

dart
5743 projects
swift
15916 projects
kotlin
9241 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to barcode scan2

Zxinglite
🔥 ZXing的精简版,优化扫码和生成二维码/条形码,内置闪光灯等功能。扫描风格支持:微信的线条样式,支付宝的网格样式。几句代码轻松拥有扫码功能 ,ZXingLite让集成更简单。(扫码识别速度快如微信)
Stars: ✭ 2,117 (+4823.26%)
Mutual labels:  scanner, qrcode, barcode, scan, qrcode-scanner, barcode-scanner
barcode-detector
Spec compliant polyfill of the Barcode Detection API 🤳
Stars: ✭ 31 (-27.91%)
Mutual labels:  qrcode, barcode, barcode-reader, qrcode-scanner, qrcode-reader, barcode-scanner
BarcodeReader
Simple multi-format barcode reader for Windows
Stars: ✭ 26 (-39.53%)
Mutual labels:  qrcode, barcode, barcode-reader, qrcode-scanner, qrcode-reader, barcode-scanner
Efqrcode
A better way to operate QR Code in Swift, support iOS, macOS, watchOS and tvOS.
Stars: ✭ 4,121 (+9483.72%)
Mutual labels:  qrcode, barcode, qrcode-scanner, qrcode-reader, barcode-scanner
Qr Code Scanner
📠 A simple, fast and useful progressive web application
Stars: ✭ 982 (+2183.72%)
Mutual labels:  scanner, qrcode, barcode, qrcode-scanner, barcode-scanner
Swiftscan
A barcode and qr code scanner( 二维码/条形码扫描、生成,仿微信、支付宝)
Stars: ✭ 293 (+581.4%)
Mutual labels:  scanner, qrcode, barcode, scan, qrcode-scanner
barcode-server
Barcode Server for Barcode Client-Server android application
Stars: ✭ 40 (-6.98%)
Mutual labels:  qrcode, barcode, qrcode-scanner, qrcode-reader, barcode-scanner
Barcode To Pc App
Barcode to PC app
Stars: ✭ 121 (+181.4%)
Mutual labels:  scanner, barcode, qrcode-scanner, barcode-scanner
Scannermapp
A QR-code and barcode acanner app built in Delphi using ZXing and TFrameStand
Stars: ✭ 65 (+51.16%)
Mutual labels:  qrcode, barcode, qrcode-scanner, barcode-scanner
Flutter barcode scanner
Barcode scanner plugin for flutter. Supports barcode scanning for Android and iOS
Stars: ✭ 194 (+351.16%)
Mutual labels:  scanner, barcode, scan, barcode-scanner
Barcodescanner.xf
Barcode Scanner using GoogleVision API for Xamarin Form
Stars: ✭ 82 (+90.7%)
Mutual labels:  qrcode, barcode, qrcode-scanner, barcode-scanner
ai barcode
Barcode generation,Barcode scanning,qrcode,qrcode generation,qrcode creator,flutter barcode,flutter qrcode,support android iOS web platform
Stars: ✭ 99 (+130.23%)
Mutual labels:  barcode-reader, qrcode-scanner, qrcode-reader, barcode-scanner
android-zbar-sdk
🔗 android-zbar-sdk, provide jni source, so file and jar file used alone, gradle/maven remote dependencies.
Stars: ✭ 311 (+623.26%)
Mutual labels:  qrcode, barcode, qrcode-scanner, barcode-scanner
Qrandbarcodescanner
An Android app for scanning QR codes and barcodes
Stars: ✭ 114 (+165.12%)
Mutual labels:  scanner, barcode, reader
Zzyqrcode
a scanner for QRCode barCode 最好用的ios二维码、条形码,扫描、生成框架,支持闪光灯,从相册获取,扫描音效等,高仿微信,微博
Stars: ✭ 123 (+186.05%)
Mutual labels:  scanner, qrcode, barcode
Zzyqrcodeswift
a scanner for QRCode barCode 最好用的ios二维码、条形码,扫描、生成框架,支持闪光灯,从相册获取,扫描音效等,高仿微信,微博
Stars: ✭ 97 (+125.58%)
Mutual labels:  scanner, qrcode, barcode
Javascript Barcode Reader
Simple and Fast Barcode decoder with support of Code128, Code93, Code39, Standard/Industrial 2 of 5, Interleaved 2 of 5, Codabar, EAN-13, EAN-8 barcodes in javascript.
Stars: ✭ 127 (+195.35%)
Mutual labels:  scanner, barcode, reader
Tesseract Ocr Scanner
基于Tesseract-OCR实现自动扫描识别手机号
Stars: ✭ 622 (+1346.51%)
Mutual labels:  scanner, qrcode, qrcode-scanner
ZZYQRCode
a scanner for QRCode barCode 最好用的ios二维码、条形码,扫描、生成框架,支持闪光灯,从相册获取,扫描音效等,高仿微信,微博
Stars: ✭ 124 (+188.37%)
Mutual labels:  scanner, qrcode, barcode
r scan
📷🖨Flutter二维码&条形码扫描插件,支持相机、文件、链接、Uint8List类型扫描
Stars: ✭ 108 (+151.16%)
Mutual labels:  qrcode, barcode, scan

GitHub license GitHub stars Pub GitHub forks

Reborned🎉

Original barcode_scan was discontinued, so barcode_scan2 was borned with sound null safety support🎉

barcode_scan2

A flutter plugin for scanning 2D barcodes and QR codes.

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

Features

  • Scan 2D barcodes
  • Scan QR codes
  • Control the flash while scanning
  • Permission handling

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" />

  • 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.61'
    // ...
    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

<dict>
    <!-- ... -->
    <key>NSCameraUsageDescription</key>
    <string>Camera permission is required for barcode scanning.</string>
    <!-- ... -->
</dict>

Usage

import 'package:barcode_scan/barcode_scan.dart';

void main() async {
  var result = await BarcodeScanner.scan();

  print(result.type); // The result type (barcode, cancelled, failed)
  print(result.rawContent); // The barcode content
  print(result.format); // The barcode format (as enum)
  print(result.formatNote); // If a unknown format was scanned this field contains a note
}

Advanced usage

You can pass options to the scan method:

import 'package:barcode_scan/barcode_scan.dart';

void main() async {

  var options = ScanOptions(
    // set the options
  );

  var result = await BarcodeScanner.scan(options: options);

  // ...
}

Supported options

Option Type Description Supported by
strings.cancel String The cancel button text on iOS iOS only
strings.flash_on String The flash on button text iOS + Android
strings.flash_off String The flash off button text iOS + Android
restrictFormat BarcodeFormat[] Restrict the formats which are recognized iOS + Android
useCamera int The index of the camera which is used for scanning (See BarcodeScanner.numberOfCameras) iOS + Android
autoEnableFlash bool Enable the flash when start scanning iOS + Android
android.aspectTolerance double Enable auto focus on Android Android only
android.useAutoFocus bool Set aspect ratio tolerance level used in calculating the optimal Camera preview size Android only

Development setup

Setup protobuf

Mac:

$ brew install protobuf
$ brew install swift-protobuf

Windows / Linux: https://github.com/protocolbuffers/protobuf#protocol-compiler-installation

Activate the protobuf dart plugin:

$ flutter pub global activate protoc_plugin

Install theProtobuf Support plugin for IDEA / Android Studio or vscode-proto3 for VS Code

If you changed the protos.proto you've to execute the ./generate_proto.sh to update the dart / swift sources

Common problems

Android "Could not find org.jetbrains.kotlin:kotlin-stdlib-jre..."

Change org.jetbrains.kotlin:kotlin-stdlib-jre to org.jetbrains.kotlin:kotlin-stdlib-jdk (StackOverflow)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].