marcFromLocale static method

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

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

Example: (xxu, po, etc.)

Implementation

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