From the user perspective, inserting a phone number manually to make a favor request is not the preffered method, as it is susceptible to mistakes.
Importing a contact from the user's phone is a platform-specific task that, of course, has similarities. The final point is to launch the platform's contact selector and get a single contact from it.
The pub repository contains a set of plugins that help with this task. Some of them are as follows:
- contact_picker: Supports picking a phone number from the phone's contact list
- contacts_service: Provides an API that allows us to pick a contact and also manage them
If you remember, our Favors app allows the user to request a favor from another user by adding the phone number of the targeted friend. Importing the contact from the phone's contact list is the best way to do it.
...