LocalizationExt extension
Extends BuildContext to provide easy access to LocalizationManager methods.
This extension adds several convenience methods to any BuildContext, facilitating the management of localization actions directly from the context.
- on
Properties
- locManager → LocalizationManager
-
Retrieves the LocalizationManager from the nearest LocalizationProvider in the widget tree.
no setter
Methods
-
addTranslation(
String name) → void - Adds a translation resource by its name.
-
changeLocale(
Locale newLocale) → void - Changes the application's current locale.
-
removeTranslation(
String name) → void - Removes a translation resource by its name.