LanguageUtils class
Utility class for handling app translation language functionalities.
This class provides functions to convert between language codes, retrieve language names, and map between locale and supported languages.
Constructors
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 Methods
-
getFullNameForLangCode(
LangCode langCodeToGetStringFor) → String - Returns the full name of the language based on the LangCode provided.
-
getLangCodeFromItsStringRep(
String langCodeAsString) → LangCode - Converts a string representation of a language code back to its corresponding LangCode.
-
getLangCodeFromLocale(
Locale locale) → LangCode - Retrieves the supported LangCode from a user's locale.
-
getStringRepForLangCode(
LangCode langCodeToGetStringFor) → String - Returns the short string representation of the LangCode for programmatic use.
-
getSupportedLanguagesAsStringList(
) → List< String> - Retrieves a list of supported languages as a list of string representations.