defaultLocale property

String? get defaultLocale

The default locale, or null.

Implementation

String? get defaultLocale => _defaultLocale;
set defaultLocale (String? locale)

Sets (or, with null, clears) the default locale.

Throws UnregisteredLocaleException if locale isn't defined.

Implementation

set defaultLocale(String? locale) {
  if (locale != null && !hasLocale(locale)) {
    throw const UnregisteredLocaleException(
      'Attempted to set default to a locale that is not defined',
    );
  }
  _defaultLocale = locale;
}