getCountryById method

Future<LokotroCountry?> getCountryById(
  1. String countryId
)

Get country by ID

Implementation

Future<LokotroCountry?> getCountryById(String countryId) async {
  final countries = await fetchCountries();

  for (final country in countries) {
    if (country.refCountry.id == countryId) {
      return country;
    }
  }

  return null;
}