Hi, thanks a lot for your nice videos! I just got a small question: why isn't it better to execute the navigation (go()) inside a BlocListener which is triggered by the Cubit emit?
Hi, its great video. I have a query. How will we configure redirects . Suppose we have login, registration, about us or more screen which we want to navigate using go_router before authentication and once authenticated it will redirect to home page. when we write logic if not authenticated redirect to login page, it always comes to login page..not able to navigate to register screen or about us screens. Can you please provide a solution.
Hi, thanks a lot for your nice videos! I just got a small question: why isn't it better to execute the navigation (go()) inside a BlocListener which is triggered by the Cubit emit?
OnDestinationSelected requires a function. BlocListiner can also be used for navigation but here we need to pass the function
Hi, its great video. I have a query. How will we configure redirects . Suppose we have login, registration, about us or more screen which we want to navigate using go_router before authentication and once authenticated it will redirect to home page. when we write logic if not authenticated redirect to login page, it always comes to login page..not able to navigate to register screen or about us screens. Can you please provide a solution.
You can use the Change Notifier for it. You can use it with redirect option with GoRouter.I have covered it on my course in depth.