PhoneCodes class

Constructors

PhoneCodes()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

findCountryDatasByCountryCodes({required List<String> countryIsoCodes}) List<PhoneCountryData>
Finds a list of PhoneCountryData objects by a list of iso codes, e.g. countryIsoCodes: 'RU', 'US', 'AU'
getAllCountryCodes({bool isForce = false}) List<String>
returns a list of all available country codes like 'RU', 'US', 'GB' etc
getAllCountryDatas({String langCode = '', bool isForce = false}) List<PhoneCountryData>
langCode for now the only supported code beside the default (english) is Russian. countryRU. If you want to translate the names of the countries to your language, please feel free to do it and make a pull request. Just keep the naming convention like countryBR, countryDE and so on isForce pass true if you need to update cache
getAllCountryDatasByPhoneCode(String phoneCode) List<PhoneCountryData>
getCountryDataByPhone(String phone, {int? substringLength}) PhoneCountryData?
getPhoneCountryDataByCountryCode(String countryCode) PhoneCountryData?
Find a PhoneCountryData by a two-symbol country code like "US" or "RU"
removeCountryCode(String phoneWithCountryCode) String
Removes a country code from a phone