mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
fix null check when user exits out of qr code scanner (#2002)
This commit is contained in:
@@ -215,7 +215,9 @@ abstract class NodeCreateOrEditViewModelBase with Store {
|
||||
bool isCameraPermissionGranted =
|
||||
await PermissionHandler.checkPermission(Permission.camera, context);
|
||||
if (!isCameraPermissionGranted) return;
|
||||
String code = await presentQRScanner(context);
|
||||
String? code = await presentQRScanner(context);
|
||||
if (code == null) throw Exception("Unexpected QR code value: aborted");
|
||||
|
||||
if (code.isEmpty) {
|
||||
throw Exception('Unexpected scan QR code value: value is empty');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user