copyWith method

  1. @override
PushMessageContentVoiceNote copyWith({
  1. VoiceNote? voiceNote()?,
  2. bool? isPinned,
})
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
PushMessageContentVoiceNote copyWith({
  VoiceNote? Function()? voiceNote,
  bool? isPinned,
}) => PushMessageContentVoiceNote(
  voiceNote: voiceNote != null ? voiceNote() : this.voiceNote,
  isPinned: isPinned ?? this.isPinned,
);