LanguageConcrete class

Inheritance

Constructors

LanguageConcrete({@required dynamic langCode, @required dynamic addedLanguages})

Properties

addedLanguages Map<String, LanguageInstance>
this is the variable that holds the added languages
read / writeinherited-setteroverride-getter
globalAccessableValues List<LangModel>
this variable holds values that are shared between all the language models this helps us not to decleare multiple same values from multiple class
read / writeinherited
hashCode int
The hash code for this object.
read-onlyinherited
langCode String
the language code like en of the currently selected language
read / writeinherited-setteroverride-getter
languageInstance LanguageInstance
holds info about the current selected language
read / writeinherited
languagesIndex Map<String, int>
currently available languages index
read / writeinherited
langValues List<LangModel>
language representation of the current language
read / writeinherited
replaceString String
replaceString is a String that will be used when we want to append additional data to the current data for example if we have a langValue with code price and value Price:
read / writeinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
selectedLangId int
the language id given to the selected language instance
read / writeinherited

Methods

get(String langKey, {String alt = '', List append = const []}) String
this function returns the associated value of the langKey that means the first parameter of LangModel and if there is any value that the language model accepts it appends respectively for example if we assume that itemsAdded holds the below value for English You have added $replaceString item(s) for Amharic $replaceString እቃ(ዎችን) አክለዋል
inherited
getAvailableLanguages() List<DropdownLangModel>
returns all the available languages as a dropdown model
inherited
join(String joiner, {List values}) String
this function joins an array with a string
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
parse(dynamic value, {List<String> keys = const [], String append = ""}) List<String>
this function parses values from a JSON Object with multible language dependences for example if we have a values the come from an Api call or something like this
inherited
set(List value, {int index = -1}) String
this function gets a value from the an array and returns a String based on the selected language if the length of the array passed is less than the available languages it return the first value of the array assume if we have a product with two different name like below
inherited
setCurrentLanguage() → dynamic
this function set the current language values from its respective class or refresh if there is any changes made and adds the globalAccessableValues to the model
inherited
toString() String
A string representation of this object.
inherited
withCode({String langCode}) CustomLanguage
this function will be used to call other language models directly from the currently selected language model for example if the current selected language is English and i wanted to access others language values without changing the currently selected language like Amharic i can do it like this with language code am
inherited

Operators

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