copyWith method

  1. @override
InputMessageAnimation copyWith({
  1. InputAnimation? animation,
  2. FormattedText? caption()?,
  3. bool? showCaptionAboveMedia,
  4. bool? hasSpoiler,
})
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
InputMessageAnimation copyWith({
  InputAnimation? animation,
  FormattedText? Function()? caption,
  bool? showCaptionAboveMedia,
  bool? hasSpoiler,
}) => InputMessageAnimation(
  animation: animation ?? this.animation,
  caption: caption != null ? caption() : this.caption,
  showCaptionAboveMedia: showCaptionAboveMedia ?? this.showCaptionAboveMedia,
  hasSpoiler: hasSpoiler ?? this.hasSpoiler,
);