项目作者: leyan95

项目描述 :
🛠 Flutter QR code scanner plugin.
高级语言: Java
项目地址: git://github.com/leyan95/qrcode_scanner.git
创建时间: 2018-11-10T06:44:23Z
项目社区:https://github.com/leyan95/qrcode_scanner

开源协议:MIT License

下载


Language: English | 中文简体

QR Code Scanner

License
Pub

A Flutter plugin 🛠 to scanning. Ready for Android 🚀

github

Permission:

  1. <uses-permission android:name="android.permission.CAMERA" ></uses-permission>
  2. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
  3. <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>

Installation

Add this to your package’s pubspec.yaml file:

  1. dependencies:
  2. qrscan: ^0.3.3

Scan Usage example

  1. import 'package:qrscan/qrscan.dart' as scanner;
  2. String cameraScanResult = await scanner.scan();

Supported

  • Scan BR-CODE
  • Scan QR-CODE
  • Control the flash while scanning
  • Apply for camera privileges
  • Scanning BR-CODE or QR-CODE in albums
  • Parse to code string with uint8list
  • Scanning the image of the specified path
  • Display the switch button of the flashlight according to the light intensity
  • Generate QR-CODE

Features

  • Generate BR-CODE

TODO

  • [] Support IOS (example builds, but invoking scanner does not return)
  • [] Provide iOS setup documentation, if necessary

Demo App

qrscan.gif

Select Bar-Code or QR-Code photos for analysis and Generating QR-Code

  1. import 'package:qrscan/qrscan.dart' as scanner;
  2. // Select Bar-Code or QR-Code photos for analysis
  3. String photoScanResult = await scanner.scanPhoto();
  4. // Generating QR-Code
  5. Uint8List result = await scanner.generateBarCode('https://github.com/leyan95/qrcode_scanner');
  6. // Scanning the image of the specified path
  7. String barcode = await scanner.scanPath(path);
  8. // Parse to code string with uint8list
  9. File file = await ImagePicker.pickImage(source: ImageSource.camera);
  10. Uint8List bytes = file.readAsBytesSync();
  11. String barcode = await scanner.scanBytes(uint8list);

Contribute

We would ❤️ to see your contribution!

License

Distributed under the MIT license. See LICENSE for more information.

About

Created by Shusheng.

Thanks