phone_input_formatter library




formatAsPhoneNumber(String phone, {InvalidPhoneAction invalidPhoneAction: InvalidPhoneAction.ShowUnformatted, bool useSeparators: true}) String
getCountryDatasByPhone(String phone) List<PhoneCountryData>
returns a list of country datas with a country code of the supplied phone number. The return type is List because many countries and territories may share the same phone code the list will contain one PhoneCountryData at max returns A list of PhoneCountryData datas or an empty list
isPhoneValid(String phone) bool
checks not only for length and characters but also for country phone code. If it's not found the succession of numbers will not be marked as a valid phone