Skip to content

Latest commit

 

History

History
60 lines (39 loc) · 1.81 KB

README-ZH.md

File metadata and controls

60 lines (39 loc) · 1.81 KB

文档语言: English | 中文简体

二维码扫描插件

License Pub Codacy Badge

A Flutter plugin 🛠 to scanning. Ready for Android 🚀 base on ZXing github

权限:

<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.VIBRATE"/>

安装

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

dependencies:
 qrscan: ^0.3.3

使用方式

qrscan.gif

import 'package:qrscan/qrscan.dart' as scanner;

// Select Bar-Code or QR-Code photos for analysis
String photoScanResult = await scanner.scanPhoto();

// Generating QR-Code
Uint8List result = await scanner.generateBarCode('https://github.com/leyan95/qrcode_scanner');

// Scanning the image of the specified path
String barcode = await scanner.scanPath(path);

// Parse to code string with uint8list
File file = await ImagePicker.pickImage(source: ImageSource.camera);
Uint8List bytes = file.readAsBytesSync();
String barcode = await scanner.scanBytes(uint8list);

贡献

We would ❤️ to see your contribution!

许可

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

关于

Created by Shusheng.