findCountryByIsoCode static method

dynamic findCountryByIsoCode(
  1. String isoCode
)

returns a country with the specified isoCode or null if none or more than 1 are found

Implementation

static findCountryByIsoCode(String isoCode) {
  return ALL.singleWhere(
        (item) => item.isoCode.toLowerCase() == isoCode.toLowerCase(),
  );
}