detailsForLocale static method

CountryDetails detailsForLocale(
  1. [Locale? locale]

Returns the CountryDetails for the given locale. If not provided, the device's locale will be used instead. Have in mind that this is different than specifying supportedLocales on your app. Exposed properties are the name, alpha2Code, alpha3Code and dialCode


"name": "United States",
"alpha2Code": "US",
"dial_code": "+1",


static CountryDetails detailsForLocale([Locale? locale]) {
  String? code = _resolveLocale(locale);
  return CountryDetails.fromMap(codes[code!], _localizedCountryNames[code]);