Setting up the project
In this chapter, we will learn how to use Flutter’s form
APIs to build an interactive Contacts application that allows us to create a list of contacts that includes their First name, Last name, Phone, and Email.
When we have finished, the resulting application should look as follows:
Figure 6.1 – Completed Contacts application
In the preceding figure, we see three different screens:
- A home screen that displays a list of contacts using an avatar of their first initial and their full name
- A details screen that allows us to view each contact’s information
- A create/edit screen that allows us to edit existing contacts or create a new one
We will start with an example that already includes the List and Details views in the contact_list_view.dart
and contact_details_view.dart
files, respectively. The application uses GoRouter and Provider as dependencies for routing, state management, and dependency...