flutter_libphonenumber
flutter_libphonenumber copied to clipboard
removeCountryCodeFromMask results in incorrect phone mask for national numbers
Calling this text formatter:
LibPhonenumberTextFormatter( country: usCountry, PhoneNumberFormat.national)
Will result in the following mask "0) 000-0000" It should be "(000) 000-0000"
There are a couple problems:
-
input_formatter.dart line 28: removeCountryCodeFromMask gets set to true even though the phone number is a national number and the inputContainsCountryCode is false.
-
Once removeCountryCodeFromMask is true country_data.dart line 188 will remove three characters from the beginning of the national mask therefore chopping off the area code portion of the national phone number mask.