l10n_plus_flutter 0.1.1
l10n_plus_flutter: ^0.1.1 copied to clipboard
Flutter integration for l10n_plus, with a locale controller, a scope widget and a BuildContext extension.
0.1.1 #
- Docs: on Flutter 3.47+
GlobalMaterialLocalizationscomes frompackage:material_ui; the README and the example say so. Theflutter_localizationsone is deprecated there.
Changelog #
0.1.0 #
First release. The Flutter edge of l10n_plus.
L10nController: the active locale, with a synchronoussetLocaleand optional system-locale following. The generated factory hands it the platform's locales, so an app opens in the device's language on the first frame rather than waiting for adidChangeLocalesthat never comes.L10nScope: anInheritedNotifierthat rebuilds dependents on a change, with a diagnostic that explains what to do when it is missing.Localeinterop between Flutter andL10nLocale.- Supports the generated
context.l10nextension, named bycontext_extensionin the configuration. L10nController(current: ...): withglobal_translations: truethe generated factory passes the cell behindAppLocalizations.current, and the controller installs its locale there before notifying and releases it ondispose.