fts_system_locale 0.0.1 copy "fts_system_locale: ^0.0.1" to clipboard
fts_system_locale: ^0.0.1 copied to clipboard

outdated

Change the system locale for your app.

fts_system_locale #

A flutter plugin to set the system locale. This is companion plugin flutter_translation_sheet package.

Android iOS Linux macOS Web Windows
Support SDK 16+ 9.0+ Not yet 10.11+ Not planned Not yet

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!

4
likes
150
pub points
47%
popularity

Publisher

unverified uploader

Change the system locale for your app.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on fts_system_locale