copyWith method
InputMessageDocument
copyWith({
- InputFile? document,
- InputThumbnail? thumbnail()?,
- bool? disableContentTypeDetection,
- 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
InputMessageDocument copyWith({
InputFile? document,
InputThumbnail? Function()? thumbnail,
bool? disableContentTypeDetection,
FormattedText? Function()? caption,
}) =>
InputMessageDocument(
document: document ?? this.document,
thumbnail: thumbnail != null ? thumbnail() : this.thumbnail,
disableContentTypeDetection:
disableContentTypeDetection ?? this.disableContentTypeDetection,
caption: caption != null ? caption() : this.caption,
);