Flutter | Clean Architecture | Configure GoRouter

Поділитися
Вставка

КОМЕНТАРІ • 4

  • @baptisteseux4381
    @baptisteseux4381 Рік тому +1

    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?

    • @MobileAcademys
      @MobileAcademys  Рік тому +1

      OnDestinationSelected requires a function. BlocListiner can also be used for navigation but here we need to pass the function

  • @NikeshMadhav
    @NikeshMadhav Рік тому +1

    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.

    • @MobileAcademys
      @MobileAcademys  Рік тому

      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.