Last updated:
0 purchases
locale settings
locale_settings #
A plugin which supports to change the current language on an os level.
Getting Started #
Import the package:
import 'package:locale_settings/locale_settings.dart';
copied to clipboard
Usage #
Create a variable for the plugin:
final localeSettingsPlugin = const LocaleSettings();
copied to clipboard
Set the current locale:
await localeSettingsPlugin.setCurrentLocale(...);
copied to clipboard
Get the current locale:
final locale = await localeSettingsPlugin.getCurrentLocale();
copied to clipboard
Listen for changes regarding the current locale:
LocaleListener(
builder: (final context, final locale) {
...
},
)
copied to clipboard
Supported systems #
Supports Android, iOS and macOS out of the box.
To also support Windows, Linux and Web use either
locale_settings_hive or
locale_settings_preferences
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.