copyWith method
InputMessageVideo
copyWith({
- InputFile? video,
- InputThumbnail? thumbnail()?,
- List<
int> ? addedStickerFileIds, - int? duration,
- int? width,
- int? height,
- bool? supportsStreaming,
- FormattedText? caption()?,
- MessageSelfDestructType? selfDestructType()?,
- 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
InputMessageVideo copyWith({
InputFile? video,
InputThumbnail? Function()? thumbnail,
List<int>? addedStickerFileIds,
int? duration,
int? width,
int? height,
bool? supportsStreaming,
FormattedText? Function()? caption,
MessageSelfDestructType? Function()? selfDestructType,
bool? hasSpoiler,
}) =>
InputMessageVideo(
video: video ?? this.video,
thumbnail: thumbnail != null ? thumbnail() : this.thumbnail,
addedStickerFileIds: addedStickerFileIds ?? this.addedStickerFileIds,
duration: duration ?? this.duration,
width: width ?? this.width,
height: height ?? this.height,
supportsStreaming: supportsStreaming ?? this.supportsStreaming,
caption: caption != null ? caption() : this.caption,
selfDestructType: selfDestructType != null
? selfDestructType()
: this.selfDestructType,
hasSpoiler: hasSpoiler ?? this.hasSpoiler,
);