addAvailableLocale method

bool addAvailableLocale(
  1. String locale
)

Defines locale (with no mappings); returns false if it already exists.

Implementation

bool addAvailableLocale(String locale) {
  if (hasLocale(locale)) return false;
  _locales.add(locale);
  _localeResources[locale] = [];
  return true;
}