platform_interface 1.0.4 copy "platform_interface: ^1.0.4" to clipboard
platform_interface: ^1.0.4 copied to clipboard

A Flutter package that can be used to extract the locales that are currently defined on a device with the current locale set as the first in the list.

platform_interface #

Gets the device locale data, independent of the app locale settings.

Usage #

import 'package:platform_interface/platform_interface.dart';

then

List languages = await PlatformInterface.preferredLanguages;
String locale = await PlatformInterface.currentLocale;

this should return a list of the preferred/current language locales setup on the device, with the current one being the first in the list or just the currently set device locale.

iOS #

Updates #

Getting Started #

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

1
likes
30
pub points
45%
popularity

Publisher

unverified uploader

A Flutter package that can be used to extract the locales that are currently defined on a device with the current locale set as the first in the list.

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

flutter, pigeon

More

Packages that depend on platform_interface