findAllByPhoneCode static method

List<Country> findAllByPhoneCode(
  1. String phoneCode
)

Find all countries by phone code.

Supports inputs with and without '+' prefix.

Implementation

static List<Country> findAllByPhoneCode(String phoneCode) {
  final normalized = _normalizePhoneCode(phoneCode);
  if (normalized.isEmpty) return const [];
  final countries = _countriesByPhoneCodeAll[normalized];
  if (countries == null) return const [];
  return List<Country>.unmodifiable(countries);
}