Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to make authorization with multiple screens in flutter?

I am new at FLutter and I want to try to make authorization but I don’t know how to do it properly.

I have multiple screens with inputs

First screen: Choose country in textFormField => Second screen: type name, email in textFormFields => Third screen: type and confirm password in textFormFields

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

And when I press sign up button, I should send country, name, email and password to a server.

But where to store values of previous screens. Should I just transfer all data from one screen to another using navigator, or there is a better solution?

I know in React exists redux or mobX(state manager) but do we have something similar in flutter?

>Solution :

Should I just transfer all data from one screen to another using
navigator

No, this will work but, when your project grows up, it will be a mess.

I know in React exists redux or mobX(state manager) but do we have
something similar in flutter?

Yes, Flutter have redux and mobX lib too, you can take a look on flutter_redux, mobx, and some other famous state management:
provider, flutter_bloc. If you are a new one, I think provider will be easier to learn, bloc is more boilerplate code but it’ll be good with big projects.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading