intl_phone_number_input icon indicating copy to clipboard operation
intl_phone_number_input copied to clipboard

Invalid country code error

Open dineshkumarab opened this issue 2 years ago • 10 comments

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 avatar Jan 12 '23 13:01 dineshkumarab

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.

dineshkumarab avatar Jan 12 '23 14:01 dineshkumarab

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

Anton-Tesenchuk avatar Jan 13 '23 09:01 Anton-Tesenchuk

Same here

Abdelazeem777 avatar Jan 16 '23 13:01 Abdelazeem777

Same here

joshuamoreno1 avatar Feb 02 '23 04:02 joshuamoreno1

Same here

jakubjaniec avatar Feb 23 '23 09:02 jakubjaniec

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 avatar Mar 06 '23 09:03 ashley-arta

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?

ashley-arta avatar Mar 20 '23 09:03 ashley-arta

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

chiptech-mitchell avatar May 17 '23 00:05 chiptech-mitchell

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

ashley-arta avatar May 17 '23 02:05 ashley-arta

@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.

chiptech-mitchell avatar May 17 '23 02:05 chiptech-mitchell