findByDialCode static method

List<Country> findByDialCode(
  1. String code
)

Returns a List of countries by its dial code

Throws an exception if the country could not be found

Implementation

static List<Country> findByDialCode(String code) {
  return _list
      .where(
        (country) => country.dialCode == code,
      )
      .toList();
}