locale property
The current locale language translation
Implementation
@override
Locale? get locale {
injected.initialize();
TopStatelessWidget.addToObs?.call(
injected,
_onTopWidgetObserverAdded,
didChangeLocales,
);
return _locale;
}
The current locale language translation
Implementation
@override
set locale(Locale? l) {
if (l == null) {
return;
}
if (l is SystemLocale && _locale is SystemLocale) {
if (l.runtimeType == SystemLocale || _locale == l) {
return;
}
} else if (l is! SystemLocale && _locale is! SystemLocale) {
if (_locale == l) {
return;
}
}
final lan = _getLanguage(l);
injected.setState((s) => lan);
}