parseCountryCode static method

Country parseCountryCode(
  1. String countryCode
)

Returns a single country if it matches the given countryCode (iso2_cc).

Throws a StateError if no matching element is found.

Implementation

static Country parseCountryCode(String countryCode) {
  return _getFromCode(countryCode.toUpperCase());
}