copyWith method
InputMessageAudio
copyWith({
- InputFile? audio,
- InputThumbnail? albumCoverThumbnail()?,
- int? duration,
- String? title,
- String? performer,
- FormattedText? caption()?,
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
InputMessageAudio copyWith({
InputFile? audio,
InputThumbnail? Function()? albumCoverThumbnail,
int? duration,
String? title,
String? performer,
FormattedText? Function()? caption,
}) =>
InputMessageAudio(
audio: audio ?? this.audio,
albumCoverThumbnail: albumCoverThumbnail != null
? albumCoverThumbnail()
: this.albumCoverThumbnail,
duration: duration ?? this.duration,
title: title ?? this.title,
performer: performer ?? this.performer,
caption: caption != null ? caption() : this.caption,
);