translateMessage method
Implementation
Future<void> translateMessage(int index) async {
/*if (SessionManagement.isGoogleTranslationEnable()) {
var text = chatList[index].messageTextContent!;
debugPrint("customField : ${chatList[index].messageCustomField.isEmpty}");
if (chatList[index].messageCustomField.isNotEmpty) {
} else {
await translator
.translate(
text: text, to: SessionManagement.getTranslationLanguageCode())
.then((translation) {
var map = <String, dynamic>{};
map["is_message_translated"] = true;
map["translated_language"] =
SessionManagement.getTranslationLanguage();
map["translated_message_content"] = translation.translatedText;
debugPrint(
"translation source : ${translation.detectedSourceLanguage}");
debugPrint("translation text : ${translation.translatedText}");
}).catchError((onError) {
debugPrint("exception : $onError");
});
}
}*/
}