LocaleConfig constructor

LocaleConfig(
  1. String locale,
  2. String l10n, {
  3. String? abbr,
  4. String? region,
  5. String? name,
  6. bool fallback = false,
})

Implementation

LocaleConfig(String locale, String l10n,
    {String? abbr, String? region, String? name, bool fallback = false}) {
  this.locale = locale;
  this.l10n = l10n;
  this.abbr = abbr ?? locale.split("_")[0];
  this.region = region ?? locale.replaceAll("${this.abbr}_", "");
  this.name = name ?? all_locales_supported[locale] ?? "unknown";
  this.fallback = fallback;
}