localePrefProvider top-level property
- @ProviderFor.new(LocalePref)
final
User-selected UI language. null means "follow the device locale" — the
root MaterialApp.locale is left null and Flutter resolves against
AppLocalizations.supportedLocales. Persisted to SharedPreferences.
As a side effect this keeps Intl.defaultLocale in sync with the effective
language so the app's bare DateFormat call-sites format dates for the
chosen locale instead of always en_US (audit M6). When the pref is
null (follow-system), Intl.defaultLocale is cleared so intl falls back
to the platform locale.
Implementation
@ProviderFor(LocalePref)
final localePrefProvider = LocalePrefProvider._();