Home > OS >  what should I use to control the navigation of a user
what should I use to control the navigation of a user

Time:12-29

So I'm new to flutter and firebase and I was watching a tutorial about "auth" and the guy was using "Provider". I followed the tutorial, and the App work this way: Sign IN -> Sing Out-> Sign In (this worked). Then I add a Button in the "Sign Out" widget that goes to the same widget "Sign Out" so the flow of the App goes: Sign In -> Sign Out-> Sign Out. In this case when I click on the button to sign Out, the app don't send me to the Sign in widget anymore and I could not find a reason. I did add some prints in the Widgets and when the user Click on the button Sign Out, the Debug console prints some text from the Sign In widget, But the image of the App stays in the Sign Out widget. I really don't know what should I do. I did put a question here but didn't find solution. So If someone could tell what should I use to control the App, I appreciated.

I did my search and found out about "riverpod", "routes" etc..... Can someone tell me what should I use?

CodePudding user response:

You can safely use any state manager, because it's just a tool for managing state in a well-architected application. In this case, I would recommend riverpod precisely because of its flexibility.

In your particular case, I recommend a wonderful article, which covers the main points of your question:

Starter Architecture for Flutter & Firebase Apps using Riverpod

  • Related