fts_system_locale
A flutter plugin to set the system locale. This is companion plugin for flutter_translation_sheet package.
Getting Started
run flutter pub add fts_system_locale
in your project directory.
Usage
Here is an example with the flutter_translation_sheet package.
DropdownButton<Locale>(
items: AppLocales.supportedLocales
.map((e) => DropdownMenuItem(value: e, child: Text
.toList(),
onChanged: (value) {
if (value != null) {
Fts.locale = value;
FtsSystemLocale().setLocale(value.languageCode).
}
},
value: Fts.locale,
),
check the example dir for a complete example.
Configuration
Android
For Android 13+ "per-app-language" support. Follow https://developer.android.com/guide/topics/resources/app-languages#app-language-settings
Others need no extra configuration.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Roi Peker |
This project follows the all-contributors specification. Contributions of any kind welcome!