setLocaleRaw method

E setLocaleRaw(
  1. String rawLocale, {
  2. bool? listenToDeviceLocale = false,
})

Sets locale using string tag (e.g. en_US, de-DE, fr) Fallbacks to base locale. Returns the locale which has been set.

Locale gets changed automatically if listenToDeviceLocale is true and TranslationProvider is used. If null, then the last state is used. By default, calling this method disables the listener.

Implementation

E setLocaleRaw(String rawLocale, {bool? listenToDeviceLocale = false}) {
  final E locale = utils.parse(rawLocale);
  return setLocale(locale, listenToDeviceLocale: listenToDeviceLocale);
}