Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hetian9288 committed Jun 8, 2019
1 parent 286bd24 commit 5d02e8b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@

## 0.0.5

## 1.0.0

16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ QR code (scan code / picture) recognition (AndroidView/UiKitView)

``` dart
import 'package:flutter_qr_reader/flutter_qr_reader.dart';
// 识别图片
final String data = await FlutterQrReader.imgScan(File);
// 嵌入视图
QrReaderView(
width: 320,
height: 350,
callback: (container) {},
)
// 打开手电筒
..setFlashlight
// 开始扫码
..startCamera
// 结束扫码
..stopCamera
```


Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.5"
version: "1.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down
4 changes: 4 additions & 0 deletions lib/qrcode_reader_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,14 @@ class _QrcodeReaderViewState extends State<QrcodeReaderView> with TickerProvider
_controller.startCamera(onQrBack);
}

bool isScan = false;
Future onQrBack(data, _) async {
if (isScan == true) return ;
isScan = true;
stopScan();
await widget.onScan(data);
startScan();
isScan = false;
}

void startScan() {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_qr_reader
description: QR code (scan QRCode and picture) recognition (AndroidView/UiKitView)
version: 0.0.5
version: 1.0.0
author: 王贺天<[email protected]>
homepage: https://github.com/hetian9288/flutter_qr_reader

Expand Down

0 comments on commit 5d02e8b

Please sign in to comment.