TranslationController class abstract

Class handling the translations and setting the language

Inheritance
Implementers

Properties

config RenovationConfig
finalinherited
currentLanguage String
The current set language. Defaults to English.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearCache() → void
Removes all translations saved in messages dictionary.
override
extendDictionary({required Map<String, String>? dict, String? lang}) → void
Add translations to the existing Map.
getCore() Renovation
Gets the reference to the Renovation instance
inherited
getCurrentLanguage() String?
Returns the currentLanguage.
getHostUrl() String
Returns the configured host URL towards the backend
inherited
getMessage({required String? txt, String? lang}) String?
Returns the translated text paired with the key txt.
handleError(String errorId, ErrorDetail error) → ErrorDetail
Returns the ErrorDetail after manipulating an existing one.
inherited
loadTranslations({String? lang}) Future<RequestResponse<Map<String, String>?>>
Loads the translation of the selected language from the backend.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCurrentLanguage(String lang) → void
A setter for currentLanguage. Defaults to 'en'
setMessagesDict({required Map<String, String> dict, String? lang}) → void
Sets the message dictionary for a certain language.
toString() String
A string representation of this object.
inherited

Operators

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