getTranslation method
Gets the translation for a key in the current language.
Implementation
String getTranslation(String key) {
if (isLoading) {
return _cache[_previousLanguage?.code]?[key] ?? key;
}
return _cache[_currentLanguage.code]?[key] ?? key;
}