countryName function

String countryName(
  1. BuildContext context,
  2. String countryCode
)

Returns the localised country name for the given two-letter countryCode using the CountryLocalizations from the current context.

Implementation

String countryName(BuildContext context, String countryCode) {
  var cL = CountryLocalizations.of(context);
  var country = cL!.countryName(countryCode: countryCode);
  return country!;
}