From e2ba4dbb3d56978b42105927d49db406df81fcb8 Mon Sep 17 00:00:00 2001 From: Adam Velebil Date: Fri, 1 Apr 2022 09:43:54 +0200 Subject: [PATCH] use only Widget's BuildContext --- lib/android/qr_scanner/qr_scanner_view.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/android/qr_scanner/qr_scanner_view.dart b/lib/android/qr_scanner/qr_scanner_view.dart index 5b3bc72c..9f4cb6c6 100755 --- a/lib/android/qr_scanner/qr_scanner_view.dart +++ b/lib/android/qr_scanner/qr_scanner_view.dart @@ -163,7 +163,6 @@ class _QrScannerViewState extends State { @override Widget build(BuildContext context) { - BuildContext dialogContext = NavigationService.navigatorKey.currentContext!; return SafeArea( child: Scaffold( appBar: AppBar( @@ -218,7 +217,7 @@ class _QrScannerViewState extends State { MaterialButton( color: Colors.white38, onPressed: () { - Navigator.of(dialogContext).pop(''); + Navigator.of(context).pop(''); }, child: const Text('Add manually'), )