copyWith method
InputMessageAnimation
copyWith({
- InputFile? animation,
- InputThumbnail? thumbnail()?,
- List<
int> ? addedStickerFileIds, - int? duration,
- int? width,
- int? height,
- FormattedText? caption()?,
- 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,
);