-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Steps to Reproduce
I am using the go_router in my app and also the get package. The problem is that since I implemented the Go-Router I can no longer show the Get.snackbar. It is failing and throwing a null-error.
For the GoRouter to work I had to add the .router for my GetMaterialApp. And then navigationKey was no longer available:
This is my GetMaterialApp:
child: GetMaterialApp.router(
title: 'Wishlists',
// navigationKey: Get.key,
// .router does not have a navigationKey so showSnackBar fails because the key is null
routeInformationProvider: router.routeInformationProvider,
routeInformationParser: router.routeInformationParser,
routerDelegate: router.routerDelegate,
translationsKeys: AppTranslation.translationsKeys,
locale: locale,
fallbackLocale: fallbackLocale,
),
This is the error:
Error: Unexpected null value.
at Object.throw_ [as throw] (http://localhost:51492/dart_sdk.js:5080:11)
at Object.nullCheck (http://localhost:51492/dart_sdk.js:5399:30)
at [_configureOverlay] (http://localhost:51492/packages/get/get_navigation/src/snackbar/snackbar_controller.dart.lib.js:2970:53)
at [_show] (http://localhost:51492/packages/get/get_navigation/src/snackbar/snackbar_controller.dart.lib.js:3113:30)
I feel like it has something to do with the key inside the GetMaterialApp, but I have no idea how to solve this.
Is this a known bug? What am I missing here?