copyWith method
VoiceSession
copyWith({
- String? id,
- VoiceSessionConfig? configuration,
- VoiceSessionState? state,
- List<
STTOutput> ? transcripts, - DateTime? startTime,
- DateTime? endTime,
Create a copy with modified values
Implementation
VoiceSession copyWith({
String? id,
VoiceSessionConfig? configuration,
VoiceSessionState? state,
List<STTOutput>? transcripts,
DateTime? startTime,
DateTime? endTime,
}) {
return VoiceSession(
id: id ?? this.id,
configuration: configuration ?? this.configuration,
state: state ?? this.state,
transcripts: transcripts ?? List.from(this.transcripts),
startTime: startTime ?? this.startTime,
endTime: endTime ?? this.endTime,
);
}