setToDefault method
void
setToDefault()
Makes the default locale current. Throws StateError if there is no default locale.
Implementation
void setToDefault() {
final defaultLocale = _defaultLocale;
if (defaultLocale == null) {
throw StateError(
'Attempted to set to default locale when default locale not set',
);
}
locale = defaultLocale;
}