getCountry function
Retrieves a mapping of country-specific information based on the provided Country enum value.
@param country The Country enum value for which to retrieve country-specific information. @return A nullable Map containing country-specific information, or null if the provided country is not recognized.
Implementation
Map<String, String>? getCountry(Country country) {
switch (country) {
case Country.kenya:
return supportedCountries['kenya'];
case Country.uganda:
return supportedCountries['uganda'];
case Country.tanzania:
return supportedCountries['tanzania'];
case Country.belgium:
return supportedCountries['belgium'];
case Country.uk:
return supportedCountries['uk'];
default:
return supportedCountries['usa'];
}
}