mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-08 20:09:24 +00:00
Used the new barcode_scan2 package instead (#559)
This commit is contained in:
parent
ca36a425a7
commit
fb8017a93c
1 changed files with 9 additions and 11 deletions
|
@ -1,17 +1,15 @@
|
|||
// import 'package:barcode_scan/barcode_scan.dart';
|
||||
import 'package:barcode_scan2/barcode_scan2.dart';
|
||||
|
||||
var isQrScannerShown = false;
|
||||
|
||||
Future<String> presentQRScanner() async {
|
||||
isQrScannerShown = true;
|
||||
// FIX-ME: BarcodeScanner
|
||||
throw Exception('Unimplemented');
|
||||
// try {
|
||||
// final result = await BarcodeScanner.scan();
|
||||
// isQrScannerShown = false;
|
||||
// return result.rawContent;
|
||||
// } catch (e) {
|
||||
// isQrScannerShown = false;
|
||||
// rethrow;
|
||||
// }
|
||||
try {
|
||||
final result = await BarcodeScanner.scan();
|
||||
isQrScannerShown = false;
|
||||
return result.rawContent;
|
||||
} catch (e) {
|
||||
isQrScannerShown = false;
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue