whereIsoIn method

List<Country> whereIsoIn(
  1. List<IsoCode> isoCodes, {
  2. List<IsoCode> omit = const [],
})

gets localized countries from isocodes

Implementation

List<Country> whereIsoIn(
  List<IsoCode> isoCodes, {
  List<IsoCode> omit = const [],
}) {
  final omitSet = Set.from(omit);
  return isoCodes
      .where((isoCode) => !omitSet.contains(isoCode))
      .where((isoCode) => _localizedCountries.containsKey(isoCode))
      .map((iso) => _localizedCountries[iso]!)
      .toList();
}