skip to Main Content

How can I get a navigatorkey in Flutter App? not null

When I click on the notification on background, it doesn't redirect to the page I want. I checked, and navigatorkey.currentContext is null. (I'm using go_router, get_it, provider) I referred to the blog below. https://zzingonglog.tistory.com/40 https://zzingonglog.tistory.com/41 final navigatorKey = GlobalKey<NavigatorState>(); FlutterLocalNotificationsPlugin…

VIEW QUESTION

Flutter – ProviderContainer and GoRouter

I want to read the GoRouter outside of main() and outside of any widget. GoRouter provider is defined as follows: final goRouterProvider = Provider<GoRouter>( (ref) { return GoRouter(...); } Then when I'm initializing flutter_local_notifications I want to read this provider…

VIEW QUESTION
Back To Top
Search