mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 09:47:35 +00:00
16 lines
320 B
Dart
16 lines
320 B
Dart
|
import 'package:barcode_scan/barcode_scan.dart';
|
||
|
|
||
|
var isQrScannerShown = false;
|
||
|
|
||
|
Future<String> presentQRScanner() async {
|
||
|
isQrScannerShown = true;
|
||
|
try {
|
||
|
final result = await BarcodeScanner.scan();
|
||
|
isQrScannerShown = false;
|
||
|
return result;
|
||
|
} catch (e) {
|
||
|
isQrScannerShown = false;
|
||
|
throw e;
|
||
|
}
|
||
|
}
|