cedvdb / phone_form_field

Flutter phone number input
https://pub.dev/packages/phone_form_field
MIT License
72 stars 100 forks source link

Option to disable autochange country when typing #269

Open Styort opened 2 weeks ago

Styort commented 2 weeks ago

I have set up a list of supported countries in the CountrySelectorNavigator (by passing a List<IsoCode> to countries parameter of CountrySelectorNavigatorconstructor ) and want to be able to enter a phone number for supported countries only. But if I start entering the phone number prefix of another country that I do not have in the list, it automatically changes to it. Here is a video with an example of reproducing the bug.

Is is possible to disable now?

cedvdb commented 2 weeks ago

What would be the expected behavior ?

What would it display when you do +1 ?

Styort commented 2 weeks ago

What would be the expected behavior ?

What would it display when you do +1 ?

Just continue displaying +1, without switching countries.

cedvdb commented 1 week ago

What do you think about this :

Styort commented 1 week ago

I would not like to give the opportunity to change the country if it is not on the list of available ones.

I would like to be able to strictly limit the input of unsupported numbers so that the user immediately understands that the application is not available in his country.

I thought that's what the list of countries in CountrySelectorNavigator was for...