copyWith method

AudioRecording copyWith({
  1. String? id,
  2. String? filePath,
  3. String? title,
  4. int? sampleRate,
  5. int? channels,
  6. int? bitDepth,
  7. int? durationMs,
  8. int? timestamp,
})

Creates a copy of this AudioRecording with the given fields replaced

Implementation

AudioRecording copyWith({
  String? id,
  String? filePath,
  String? title,
  int? sampleRate,
  int? channels,
  int? bitDepth,
  int? durationMs,
  int? timestamp,
}) {
  return AudioRecording(
    id: id ?? this.id,
    filePath: filePath ?? this.filePath,
    title: title ?? this.title,
    sampleRate: sampleRate ?? this.sampleRate,
    channels: channels ?? this.channels,
    bitDepth: bitDepth ?? this.bitDepth,
    durationMs: durationMs ?? this.durationMs,
    timestamp: timestamp ?? this.timestamp,
  );
}