getCountryByCountryCode function
This function returns an country whose countryCode
matches with the passed one.
Implementation
Future<Country?> getCountryByCountryCode(
BuildContext context, String countryCode) async {
final list = await getCountries(context);
return list.firstWhere((element) => element.countryCode == countryCode);
}