vendredi 18 décembre 2020

Sharing model across multiple screens for user registration in Flutter

I need to create user registration that spans across several screens. The user can go back and forth between screens, and select/deselect values until they reach the end. I'm trying to figure out the best way to do this using design patterns & good design principles.

Are these correct ways to approach this?

  1. I have a signup model and its values are updated as the user changes them; model object is passed from screen to screen through constructor
  2. I have a singleton signup model that's only used until the end of the registration process; don't have to pass the instance from screen to screen

Aucun commentaire:

Enregistrer un commentaire