appLocale property

Locale appLocale

Get the current app locale from persisted preferences.

Implementation

Locale get appLocale {
  String defaultLocaleTag = locales.values.first.toLanguageTag();
  String localeTag =
      _preferences.get('app_locale', defaultValue: defaultLocaleTag);

  return locales[localeTag]!;
}