valueOf static method
Returns the Country associated with code
.
Implementation
static Country valueOf(final String code) {
final $code = code.toUpperCase();
for (final country in values) {
if (country.code == $code) {
return country;
}
}
throw UnsupportedError(
'The code [$code] is not supported.',
);
}