copyWith method

  1. @override
InputInlineQueryResultVoiceNote copyWith({
  1. String? id,
  2. String? title,
  3. String? voiceNoteUrl,
  4. int? voiceNoteDuration,
  5. ReplyMarkup? replyMarkup()?,
  6. InputMessageContent? inputMessageContent,
})
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
InputInlineQueryResultVoiceNote copyWith({
  String? id,
  String? title,
  String? voiceNoteUrl,
  int? voiceNoteDuration,
  ReplyMarkup? Function()? replyMarkup,
  InputMessageContent? inputMessageContent,
}) =>
    InputInlineQueryResultVoiceNote(
      id: id ?? this.id,
      title: title ?? this.title,
      voiceNoteUrl: voiceNoteUrl ?? this.voiceNoteUrl,
      voiceNoteDuration: voiceNoteDuration ?? this.voiceNoteDuration,
      replyMarkup: replyMarkup != null ? replyMarkup() : this.replyMarkup,
      inputMessageContent: inputMessageContent ?? this.inputMessageContent,
    );