setDefaultLocale static method
Sets the default locale
. By default it is en
.
Example:
setDefaultLocale('hi');
Implementation
static void setDefaultLocale(String locale) {
assert(
_messageMap.containsKey(locale),
'[locale] must be a valid locale',
);
_defaultLocale = locale;
}