getTranslatedTranscriptFormattedToSave static method
Implementation
static String getTranslatedTranscriptFormattedToSave(
List<TranscriptionModel> transcriptions) {
StringBuffer contentBuffer = StringBuffer();
for (var entry in transcriptions) {
if (entry.isFinal) {
final String textToUse = (entry.translatedTranscription != null &&
entry.translatedTranscription!.trim().isNotEmpty)
? (entry.translatedTranscription ?? "")
: entry.transcription;
contentBuffer.writeln('${entry.name} ${entry.timestamp}');
contentBuffer.writeln(textToUse);
contentBuffer.writeln();
contentBuffer.writeln();
}
}
return contentBuffer.toString();
}