mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
15 lines
340 B
Dart
15 lines
340 B
Dart
import 'package:barcode_scan2/barcode_scan2.dart';
|
|
|
|
var isQrScannerShown = false;
|
|
|
|
Future<String> presentQRScanner() async {
|
|
isQrScannerShown = true;
|
|
try {
|
|
final result = await BarcodeScanner.scan();
|
|
isQrScannerShown = false;
|
|
return result.rawContent.trim();
|
|
} catch (e) {
|
|
isQrScannerShown = false;
|
|
rethrow;
|
|
}
|
|
}
|