countryByCode static method

UCountry? countryByCode(
  1. String? code
)

Implementation

static UCountry? countryByCode(String? code) {
  final String? cc = codeType(code) == UCodeType.country ? code : countryCodeOf(code);
  if (cc == null) return null;
  for (final UCountry c in countries) {
    if (c.code == cc) return c;
  }
  return null;
}