copyWith method

VoiceSession copyWith({
  1. String? id,
  2. VoiceSessionConfig? configuration,
  3. VoiceSessionState? state,
  4. List<STTOutput>? transcripts,
  5. DateTime? startTime,
  6. 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,
  );
}