All Projects → magnatronus → flutter-devicelocale

magnatronus / flutter-devicelocale

Licence: Apache-2.0 license
A Flutter package to read and return the set device locales

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
dart
5743 projects
java
68154 projects - #9 most used programming language
objective c
16641 projects - #2 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to flutter-devicelocale

fancy bar
A fancy yet beautiful animated widget for your Flutter apps
Stars: ✭ 33 (-26.67%)
Mutual labels:  flutter-plugin, flutter-package
Motion-Tab-Bar
A beautiful animated flutter widget package library. The tab bar will attempt to use your current theme out of the box, however you may want to theme it.
Stars: ✭ 237 (+426.67%)
Mutual labels:  flutter-plugin, flutter-package
simple gesture detector
Easy to use, reliable and lightweight gesture detector for Flutter apps, exposing simple API for basic gestures
Stars: ✭ 26 (-42.22%)
Mutual labels:  flutter-plugin, flutter-package
flutter-app
Full Feature Todos Flutter Mobile app with fireStore integration.
Stars: ✭ 138 (+206.67%)
Mutual labels:  flutter-plugin, flutter-package
gen lang
gen_lang is a dart library for internationalization. Extracts messages to generate dart files required by Intl, inspired by Intl_translation and Flutter i18n
Stars: ✭ 94 (+108.89%)
Mutual labels:  flutter-plugin, flutter-package
seo renderer
A Flutter Web Plugin to display Text Widget as Html for SEO purpose
Stars: ✭ 103 (+128.89%)
Mutual labels:  flutter-plugin, flutter-package
flutter google maps
A Flutter plugin for integrating Google Maps in iOS, Android and Web applications. It is a wrapper of google_maps_flutter for Mobile and google_maps for Web.
Stars: ✭ 86 (+91.11%)
Mutual labels:  flutter-plugin, flutter-package
flutter easyloading
✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
Stars: ✭ 1,021 (+2168.89%)
Mutual labels:  flutter-plugin, flutter-package
davinci
A flutter package to convert any widget to an Image.
Stars: ✭ 33 (-26.67%)
Mutual labels:  flutter-plugin, flutter-package
FlutterLoadingGIFs
Loading indicator GIFs. Material and Cupertino (Android and iOS) loading indicators in assorted sizes. Use as placeholders for loading remote image assets. Demo: https://gallery.codelessly.com/flutterwebsites/loadinggifs/
Stars: ✭ 28 (-37.78%)
Mutual labels:  flutter-plugin, flutter-package
getwidget-docs
Get Widgets UI library docs.
Stars: ✭ 17 (-62.22%)
Mutual labels:  flutter-plugin, flutter-package
survey kit
Flutter library to create beautiful surveys (aligned with ResearchKit on iOS)
Stars: ✭ 68 (+51.11%)
Mutual labels:  flutter-plugin, flutter-package
stop watch timer
This is Stop Watch Timer for flutter plugin.🏃‍♂️
Stars: ✭ 76 (+68.89%)
Mutual labels:  flutter-plugin, flutter-package
Free-RASP-Flutter
Flutter library for improving app security and threat monitoring on Android and iOS mobile devices.
Stars: ✭ 62 (+37.78%)
Mutual labels:  flutter-plugin, flutter-package
barcode.flutter
barcode generate library for Flutter
Stars: ✭ 58 (+28.89%)
Mutual labels:  flutter-plugin, flutter-package
link text
Easy to use text widget for Flutter apps, which converts inlined urls into working, clickable links
Stars: ✭ 20 (-55.56%)
Mutual labels:  flutter-plugin, flutter-package
flutter sliding tutorial
User onboarding library with smooth animation of objects and background colors
Stars: ✭ 127 (+182.22%)
Mutual labels:  flutter-plugin, flutter-package
flutter ume
UME is an in-app debug kits platform for Flutter. Produced by Flutter Infra team of ByteDance
Stars: ✭ 1,792 (+3882.22%)
Mutual labels:  flutter-plugin, flutter-package
liquid button
Liquify your buttons, web demo at website
Stars: ✭ 18 (-60%)
Mutual labels:  flutter-plugin, flutter-package
swipedetector
A Flutter package to detect up, down, left, right swipes.
Stars: ✭ 34 (-24.44%)
Mutual labels:  flutter-plugin, flutter-package

devicelocale

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

Usage

import 'package:devicelocale/devicelocale.dart';

then

List languages = await Devicelocale.preferredLanguages;
String locale = await Devicelocale.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.

Note for Linux

Since GNU/Linux and POSIX doesn't provide a standard API for getting the preferred languages, Devicelocale.preferredLanguages always returns the current locale.

Updates

May 2022

Merged pull requests

Oct 2021

Updated the code and APIs used by Flutter for an Android plugin - this was the source of the Deprecated API warning in the Android build.

July 2021

Add beta support for Linux

March 2021

Added test support for web

Updated for null safety

Jul 2020 Locale update v0.3.1

This is an update from a received request, where prior to 0.3.1 the 2 methods:

  • preferredLanguages
  • currentLocale

returned string values.

There are now 2 equivilent methods

  • preferredLanguagesAsLocales
  • currentAsLocale

that now also return a Locale object rather than a string.

releases

  • March 2021 1.0.0 Updated to null safety

  • July 2020 0.3.0 Updated Android to support Android Embedding V2

  • Apr 2020 0.2.3 Updated Android code from contributions from @ened

  • Mar 2020 0.2.2 Updated iOS so that if detected locale is null then it is not included in return value

  • Sep 2019 0.2.0 Updated Android following feedback from https://github.com/huzhirento . Fallback to the currentLocale when attempting to get a list of locales fro Android 7 and below as the getLocales() call is a feature of API 24 and failed for Android 7 and below.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].