copyWith method

  1. @override
DraftMessageContentVoiceNote copyWith({
  1. String? filePath,
  2. int? duration,
  3. String? waveform,
  4. MessageSelfDestructType? selfDestructType()?,
})
override

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

@override
DraftMessageContentVoiceNote copyWith({
  String? filePath,
  int? duration,
  String? waveform,
  MessageSelfDestructType? Function()? selfDestructType,
}) => DraftMessageContentVoiceNote(
  filePath: filePath ?? this.filePath,
  duration: duration ?? this.duration,
  waveform: waveform ?? this.waveform,
  selfDestructType: selfDestructType != null
      ? selfDestructType()
      : this.selfDestructType,
);