Skip to content

Commit

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

## 1.0.0

## 1.0.0+1

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: "1.0.0"
version: "1.0.0+1"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down
8 changes: 5 additions & 3 deletions lib/qrcode_reader_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class _QrcodeReaderViewState extends State<QrcodeReaderView> with TickerProvider
QrReaderViewController _controller;
AnimationController _animationController;
bool openFlashlight;
Timer _timer;
@override
void initState() {
super.initState();
Expand All @@ -44,11 +45,11 @@ class _QrcodeReaderViewState extends State<QrcodeReaderView> with TickerProvider
..addListener(upState)
..addStatusListener((state) {
if (state == AnimationStatus.completed) {
Timer(Duration(seconds: 1), () {
_timer = Timer(Duration(seconds: 1), () {
_animationController?.reverse(from: 1.0);
});
} else if (state == AnimationStatus.dismissed) {
Timer(Duration(seconds: 1), () {
_timer =Timer(Duration(seconds: 1), () {
_animationController?.forward(from: 0.0);
});
}
Expand All @@ -57,6 +58,7 @@ class _QrcodeReaderViewState extends State<QrcodeReaderView> with TickerProvider
}

void _clearAnimation() {
_timer?.cancel();
_animationController?.dispose();
_animationController = null;
}
Expand Down Expand Up @@ -230,7 +232,7 @@ class _QrcodeReaderViewState extends State<QrcodeReaderView> with TickerProvider

@override
void dispose() {
_animationController?.dispose();
_clearAnimation();
super.dispose();
}
}
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: 1.0.0
version: 1.0.0+1
author: 王贺天<[email protected]>
homepage: https://github.com/hetian9288/flutter_qr_reader

Expand Down

0 comments on commit adf4fb9

Please sign in to comment.