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

View file

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