setDefaultLocale function

void setDefaultLocale(
  1. String locale
)

Sets the default locale. By default it is en.

Example

setLocaleMessages('fr', FrMessages());
setDefaultLocale('fr');

Implementation

void setDefaultLocale(String locale) {
  assert(_lookupMessagesMap.containsKey(locale),
      '[locale] must be a registered locale');
  _default = locale;
}