0

I have build a sign up system with phone number Input in Flutter with the intl_phone_field package. Now I have to format this number to a string to fill it in a database. Is there any way to do this. I could not found anything for this.

Thank you for your help.

Luca_54
  • 529
  • 4
  • 16

1 Answers1

1

Do you use the completeNumber getter as described in the doc?

IntlPhoneField(
    decoration: InputDecoration(
        labelText: 'Phone Number',
        border: OutlineInputBorder(
            borderSide: BorderSide(),
        ),
    ),
    initialCountryCode: 'IN',
    onChanged: (phone) {
        print(phone.completeNumber);
    },
)
Thierry
  • 7,775
  • 2
  • 15
  • 33