'Multi Page Form Architecture

I'm trying to build a system to create forms with multiples pages. My approach was to separate it in three different parts.

  1. FormPages: The different form pages (Each one will have its own logic to validate fields).
  2. ProjectFormContainer: The container page that holds the pages inside a Navigator.
  3. MultiPageFormController: A controller to manage the navigation between form pages.

enter image description here

I've managed to make some progress adding to the ProjectFormContainer a ChangeNotifierProvider of MultiPageFormController but I'm not sure how to connect the individual formPages logic with the rest of the elements and what's the best way to make a decent architecture for this model.

I hope you guys could give me some advice. Thanks in advance!

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source