You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In ios this code works perfectly fine. it returns true/false based on the input and further i am able to get region code using PhoneNumberUtil().parse(emailController.text);.
This same functionality does not works in Android.
Expected Behavior
Functionality should be same as the ios one. User should be able to validate if the number is valid without region code.
Steps To Reproduce
Test the below code snippet in an Android device
bool validNumber = await PhoneNumberUtil().validate(emailController.text);
final number = await PhoneNumberUtil().parse(emailController.text);
Aditional information
Example code snippet
bool validNumber = false;
try {
validNumber = await PhoneNumberUtil().validate(emailController.text);
} catch (e) {
debugPrint("Invalid Number");
}
if (validNumber) {
final number = await PhoneNumberUtil().parse(emailController.text);
emailController.text = "+${number.countryCode}${number.nationalNumber}";
}
```
Is there an existing issue for this?
Package/Plugin version
2.0.1
Platforms
Flutter doctor
Flutter doctor
Minimal code example
Code sample
Current Behavior
In ios this code works perfectly fine. it returns true/false based on the input and further i am able to get region code using
PhoneNumberUtil().parse(emailController.text);.This same functionality does not works in Android.
Expected Behavior
Functionality should be same as the ios one. User should be able to validate if the number is valid without region code.
Steps To Reproduce
Test the below code snippet in an Android device
Aditional information
Example code snippet