setLocale method

void setLocale(
  1. String newLocale
)

Changes the active locale to newLocale, updates the reactive locale signal, and persists to storage.

BloomI18n.instance.setLocale('es-ES');

Implementation

void setLocale(String newLocale) {
  locale.value = newLocale;
  storage?.save(newLocale);
}