LanguageCode class

This package help you get the current language code and locale of the device.

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

code LanguageCodes
Get the language of the device as LanguageCodes.
no setter
locale Locale
Get current language of the device as Locale that is supported by LanguageCodes.
no setter
rawCode String
Returns a string representing the locale of the device.
no setter
rawLocale Locale
Get current language as Locale of the device.
no setter

Static Methods

setTestCode([LanguageCodes? testCode]) → void
Using this method if you want to set a specific LanguageCodes for testing. Just set it to null if you want to use the real value.
setTestLocale([Locale? testLocale]) → void