copyWith method

  1. @override
InputMessageAnimation copyWith({
  1. InputFile? animation,
  2. InputThumbnail? thumbnail()?,
  3. List<int>? addedStickerFileIds,
  4. int? duration,
  5. int? width,
  6. int? height,
  7. FormattedText? caption()?,
  8. 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({
  InputFile? animation,
  InputThumbnail? Function()? thumbnail,
  List<int>? addedStickerFileIds,
  int? duration,
  int? width,
  int? height,
  FormattedText? Function()? caption,
  bool? hasSpoiler,
}) =>
    InputMessageAnimation(
      animation: animation ?? this.animation,
      thumbnail: thumbnail != null ? thumbnail() : this.thumbnail,
      addedStickerFileIds: addedStickerFileIds ?? this.addedStickerFileIds,
      duration: duration ?? this.duration,
      width: width ?? this.width,
      height: height ?? this.height,
      caption: caption != null ? caption() : this.caption,
      hasSpoiler: hasSpoiler ?? this.hasSpoiler,
    );