ituFromLocale static method

String? ituFromLocale({
  1. Locale? locale,
})

Returns the ITU code for the given locale or if not provided, device's locale or from alpha code.

Example: (USA, POR, etc.)

Implementation

static String? ituFromLocale({Locale? locale}) {
  String? code = _resolveLocale(locale);
  Country? country =
      allCountries.firstWhereSafe((country) => country.a2 == code);
  return country?.itu;
}