Closed ibrafayez closed 2 years ago
After all this time I've figured it out the problem was I was using key in the main.dart I should've used navigatorKey... ma bad
After all this time I've figured it out the problem was I was using key in the main.dart I should've used navigatorKey... ma bad
how you can solved this problem???
was I was using key in the main
Fixed by passing navigatorKey
to MaterialApp
Hello there, first of all, thank you very much for your tutorials it helped me a lot.
I've followed your Flutter Web Advanced Navigation tutorials and some other tutorials... like Template Layouts and Navigation in Flutter the app works fine when I implemented it.
However when I tried the Advanced Navigation it says that navigationKey.currentState is null when I navigate from the navigation bar
I think the problem is from the null safety or something... I still don't know :)
My NavigationService file:
I used the try-catch to see whats happing and the output is:
My main file (Some code is deleted for readability):
Router file:
Navigation Function when you choose from the navigation bar:
I tried googling the problem everywhere and I couldn’t find the solution if you could please help me with it I would really appreciate it <3 .