natintosh / intl_phone_number_input

MIT License
164 stars 496 forks source link

Invalid country code error #365

Open dineshkumarab opened 1 year ago

dineshkumarab commented 1 year ago

Hi, I am getting the following error in the iOS platform. Not in Android Error: The country code is invalid. Code: 1

Plugin version 0.7.2

Flutter version Flutter 3.3.2

dineshkumarab commented 1 year ago

After encountering the bug, I dig into plugin code for Android and ios. In Android, if the user has not provided any region code then It will try to find the country code by another possible solution(method maybeExtractCountryCode()). But in the iOS case, if the user has not provided the region code then it will throw an invalid country code error.

Anton-Tesenchuk commented 1 year ago

Hi, I have the same issue. Only on the IOS.

Abdelazeem777 commented 1 year ago

Same here

joshuamoreno1 commented 1 year ago

Same here

jakubjaniec commented 1 year ago

Same here

ashley-arta commented 1 year ago

Verified locally that this issue is fixed by https://github.com/natintosh/plugin_libphonenumber/pull/21/files. We need to upgrade the libphonenumber_plugin lib to 0.3.1, and remove the deprecated getNameForNumber method. @natintosh if you are busy, I can make open a PR for this

ashley-arta commented 1 year ago

Verified locally that this issue is fixed by https://github.com/natintosh/plugin_libphonenumber/pull/21/files. We need to upgrade the libphonenumber_plugin lib to 0.3.1, and remove the deprecated getNameForNumber method. @natintosh if you are busy, I can make open a PR for this

@natintosh what do you think?

chiptech-mitchell commented 1 year ago

Any news on getting this merged, I encountered this issue and had to add a dependency override to get around it

ashley-arta commented 1 year ago

@chiptech-mitchell the owner has updated the dependency in the latest release

chiptech-mitchell commented 1 year ago

@ashley-arta Oh ok cool so it's fixed in 0.7.3+1?, that's good to hear I saw your open PR and just thought it wasn't fixed yet.