Skip to content

IsmailAlamKhan/fts_system_locale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6c6df95 · Oct 24, 2022

History

9 Commits
Oct 24, 2022
Oct 24, 2022
Oct 24, 2022
Oct 23, 2022
Oct 24, 2022
Oct 23, 2022
Oct 22, 2022
Oct 22, 2022
Oct 22, 2022
Oct 24, 2022
Oct 23, 2022
Oct 24, 2022
Oct 22, 2022
Oct 24, 2022

Repository files navigation

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!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published