ofNumeric static method
Returns country code by numeric code
Throws ArgumentError
if the numeric code
is invalid or there is no
ISO- or user-assigned country for this code
Implementation
static CountryCode ofNumeric(int code) {
int index;
if (_userValues.isNotEmpty) {
index = _indexOfNum(code, _userValues);
if (index != -1) {
return _userValues[index];
}
}
index = _indexOfNum(code, _values);
if (index != -1) {
return _values[index];
}
throw ArgumentError('No country assigned for numeric code \"$code\"');
}