use only Widget's BuildContext

This commit is contained in:
Adam Velebil 2022-04-01 09:43:54 +02:00
parent 71d9b5b598
commit e2ba4dbb3d
No known key found for this signature in database
GPG Key ID: AC6D6B9D715FC084

View File

@ -163,7 +163,6 @@ class _QrScannerViewState extends State<QrScannerView> {
@override
Widget build(BuildContext context) {
BuildContext dialogContext = NavigationService.navigatorKey.currentContext!;
return SafeArea(
child: Scaffold(
appBar: AppBar(
@ -218,7 +217,7 @@ class _QrScannerViewState extends State<QrScannerView> {
MaterialButton(
color: Colors.white38,
onPressed: () {
Navigator.of(dialogContext).pop('');
Navigator.of(context).pop('');
},
child: const Text('Add manually'),
)