copyWith method

InputDocument copyWith({
  1. InputFile? document,
  2. InputThumbnail? thumbnail()?,
  3. bool? disableContentTypeDetection,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

InputDocument copyWith({
  InputFile? document,
  InputThumbnail? Function()? thumbnail,
  bool? disableContentTypeDetection,
}) => InputDocument(
  document: document ?? this.document,
  thumbnail: thumbnail != null ? thumbnail() : this.thumbnail,
  disableContentTypeDetection:
      disableContentTypeDetection ?? this.disableContentTypeDetection,
);