locale property
Locale?
get
locale
Returns the device's every changing Locale.
Implementation
Locale? get locale =>
appState?.locale = Localizations.maybeLocaleOf(context!) ??
_resolveLocales(
WidgetsBinding.instance.platformDispatcher.locales,
appState?.supportedLocales,
);
set
locale
(Locale? locale)
Set the App's Locale If 'supportedLocales' are specified, this Locale must be among them.
Implementation
set locale(Locale? locale) {
if (locale != null) {
L10n.locale = locale;
// if (locale != L10n.prevLocale) {
// appState?.locale = locale;
// }
}
}