Open amirbahrawy opened 1 year ago
I face this issue too, happen when the input comes without country code, no issue before this.
And I have made a few assumption on the input, and found out the bug below from flutter's getRegionInfoFromPhoneNumber(phoneNumber, isoCode)
Printing the parsed phone number props property returns [+6011xxxxxxxx, MY, MY]
My guess is that the new PhoneNumberKit is validating wrong input field, and thus returning wrong
for fix use older dependency, problem is not in this package:
dependency_overrides: libphonenumber_plugin: 0.2.3
for fix use older dependency, problem is not in this package:
dependency_overrides: libphonenumber_plugin: 0.2.3
it worked well but is there another solution or this the only thing i can do ?
For fix use older version dependency
dependency_overrides: libphonenumber_plugin: 0.2.3
This does not sounds like a long-term fix since we would be stuck with the old dependency and its transitive dependencies. Is there a better way to solve this issue or should we just wait for the next libphonenumber_plugin version?
I used the last version of intl_phone_number_input (0.7.3+1) and overrode the libphonenumber_plugin to the latest (0.3.1) and the seems to be the best fix until the PR https://github.com/natintosh/intl_phone_number_input/pull/375 is merged and new version is released.
for fix use older dependency, problem is not in this package:
dependency_overrides: libphonenumber_plugin: 0.2.3
thanks for your help it's work with me
Describe the bug On getRegionInfoFromPhoneNumber has flutter: PlatformException(1, The country code is invalid., null, null) on iOS. On Android works fine
Package version last version
Flutter version 3.0.5