copyWith method
Implementation
TranscriptionModel copyWith({
String? id,
String? name,
String? transcription,
String? timestamp,
String? sourceLang,
String? targetLang,
bool? isFinal,
String? translatedTranscription, // Allow updating the translatedTranscription
}) {
return TranscriptionModel(
id: id ?? this.id,
name: name ?? this.name,
transcription: transcription ?? this.transcription,
timestamp: timestamp ?? this.timestamp,
sourceLang: sourceLang ?? this.sourceLang,
targetLang: targetLang ?? this.targetLang,
isFinal: isFinal ?? this.isFinal,
translatedTranscription: translatedTranscription ?? this.translatedTranscription, // Update the translatedTranscription
);
}