native_locale 0.0.3 copy "native_locale: ^0.0.3" to clipboard
native_locale: ^0.0.3 copied to clipboard

PlatformAndroid

A flutter plugin for getting and changing the native platform locale.

native locale #

A flutter plugin for getting and changing the native platform locale.

About #

Since the flutter localization is completely separate from the localization of the native app, you can face problems of unmatched locales when opening another native view that should be localized. This plugin helps you change the native localization of the app programmatically from the dart side.

Platform Support #

Android iOS
[ ]

Getting Started #

Add this to your package's pubspec.yaml file:

dependencies:
  native_locale:
copied to clipboard

Now in your Dart code, you can use:

import 'package:native_locale/native_locale.dart';
copied to clipboard

Usage #

To get the locale of the platform simply run the following command:

await NativeLocale().getNativeLocale()
copied to clipboard

To set the locale of the platform run the following command:

await NativeLocale().setNativeLocale(const Locale('en'))
copied to clipboard
5
likes
150
points
108
downloads

Publisher

verified publisheramrahmd.com

Weekly Downloads

2024.09.09 - 2025.03.24

A flutter plugin for getting and changing the native platform locale.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on native_locale