fix for qr scaner

This commit is contained in:
Serhii 2025-01-07 13:40:42 +02:00
parent de38f2dff7
commit 336a05370a
2 changed files with 4 additions and 4 deletions

View file

@ -23,7 +23,7 @@ Future<String> presentQRScanner(BuildContext context) async {
),
);
isQrScannerShown = false;
return result??'';
return result!;
} catch (e) {
isQrScannerShown = false;
rethrow;
@ -95,9 +95,7 @@ class _BarcodeScannerSimpleState extends State<BarcodeScannerSimple> {
setState(() {
popped = true;
});
SchedulerBinding.instance.addPostFrameCallback((_) {
Navigator.of(context).pop(_barcode?.rawValue ?? "");
});
Navigator.of(context).pop(_barcode!.rawValue ?? _barcode!.rawBytes);
}
}
}

View file

@ -234,6 +234,8 @@ abstract class NodeCreateOrEditViewModelBase with Store {
final rpcUser = userInfo.split(':').first;
final rpcPassword = userInfo.split(':').length > 1 ? userInfo.split(':')[1] : '';
await Future.delayed(Duration(milliseconds: 345));
setAddress(ipAddress);
setPath(path);
setPassword(rpcPassword);