Devicelocale class

A Simple plug-in that can be used to query a device( iOS or Android) to obtain a list of current set up locales and languages Copyright (c) 2019-2024, Steve Rogers. All rights reserved. Use of this source code is governed by an Apache License 2.0 that can be found in the LICENSE file.

Constructors

Devicelocale()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

currentAsLocale Future<Locale?>
Returns a Locale of the currently set DEVICE locale made up of the language and the region
no setter
currentLocale Future<String?>
Returns a String of the currently set DEVICE locale made up of the language and the region (e.g. en-US or en_US)
no setter
defaultAsLocale Future<Locale?>
Returns the DEFAULT Locale of the devices made up of the language and the region
no setter
defaultLocale Future<String?>
Returns a String of the DEFAULT device locale made up of the language and the region (e.g. en-US or en_US).
no setter
isLanguagePerAppSettingSupported Future<bool>
Returns a bool so you know if language per app setting is available.
no setter
preferredLanguages Future<List?>
Returns a List of locales from the device the first in the list should be the current one set on the device
no setter
preferredLanguagesAsLocales Future<List<Locale>>
Return a List of Locales based on the list of preferred languages This is the same list returned by preferredlanguages but as a Locales rather than Strings
no setter

Static Methods

setLanguagePerApp(Locale locale) Future<bool>
Returns a bool so you know if language per app setting is available.