getCountry method
Retrieves a CountriesModel by its dialCode
.
If no country is found with the provided dialCode
, returns the default country.
Implementation
CountriesModel getCountry(String dialCode) {
CountriesModel? dd = where((e) => e.dialCode == dialCode).firstOrNull;
return dd ?? CountriesModel.defaultCountry;
}