jeudi 17 décembre 2020

Best design & patterns for multi-screen user registration in Flutter

I need to create user registration that spans across multiple screens (lets say about 15 screens). The user can go back and forth and select/deselect until they reach the end. Changes on a page don't affect widgets on any other page, except at some point I want to show a progress bar representing how far the user is in the registration process. I'm trying to figure out the best way to do this using design patterns & good design principles.

What would be the best approach for managing the state of the text fields & buttons, and holding the registration information until the user hits "register"?

What I think will be useful:

  1. A Signup model (without good design this could get very bulky since there's lots of registration info)

  2. The Builder design pattern looks like it might be useful, but I'm not sure if it applies since all users will have the same fields in the end but with different values

  3. I could pass the Signup object in the constructor from screen to screen since it's just 1 object, updating the model every time the user updates a value, but I feel like there's a better way to do all of this

I appreciate any feedback / advice. Thank you!

Aucun commentaire:

Enregistrer un commentaire