get method
Implementation
get(text, {Map vars = const {}}) {
String hash = md5.convert(utf8.encode(text)).toString();
if (globalTranslations[hash] == null) {
// obtain translation
fetchSingleTranslation(text, _targetLocale).then((res) {
if (totalPendingRequests == 0) {
instance.setState(() {});
}
});
}
return globalTranslations[hash] ?? text;
}