mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
fix null check when user exits out of qr code scanner (#2002)
This commit is contained in:
parent
e88b6b2bcf
commit
1dc7f9309a
5 changed files with 10 additions and 4 deletions
|
@ -12,7 +12,7 @@ import 'package:flutter/scheduler.dart';
|
|||
|
||||
var isQrScannerShown = false;
|
||||
|
||||
Future<String> presentQRScanner(BuildContext context) async {
|
||||
Future<String?> presentQRScanner(BuildContext context) async {
|
||||
isQrScannerShown = true;
|
||||
try {
|
||||
final result = await Navigator.of(context).push<String>(
|
||||
|
@ -23,7 +23,7 @@ Future<String> presentQRScanner(BuildContext context) async {
|
|||
),
|
||||
);
|
||||
isQrScannerShown = false;
|
||||
return result!;
|
||||
return result;
|
||||
} catch (e) {
|
||||
isQrScannerShown = false;
|
||||
rethrow;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue