getCountryByCountryCode function

Country getCountryByCountryCode(
  1. String countryCode
)

This function returns an country whose countryCode matches with the passed one.

Implementation

Country getCountryByCountryCode(String countryCode) =>
    getCountries().firstWhere(
      (element) => element.countryCode == countryCode,
      orElse: () => Country(
        '',
        kflagPlaceHolderPath,
        '',
        '',
        {},
      ),
    );