copyWith method

  1. @override
InputMessageAudio copyWith({
  1. InputAudio? audio,
  2. 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({
  InputAudio? audio,
  FormattedText? Function()? caption,
}) => InputMessageAudio(
  audio: audio ?? this.audio,
  caption: caption != null ? caption() : this.caption,
);