updateLocale method

Future<void> updateLocale(
  1. Locale locale
)
  • updates the current locale the restart the app (notify the root builder)

Implementation

Future<void> updateLocale(Locale locale) async {
  currentLocale = locale;
  await Prefs.setString(_kPrefsKey, locale.toString());
  await load(locale);
}