InputMediaDocument.withThumbnailFile constructor
InputMediaDocument.withThumbnailFile({})
Implementation
factory InputMediaDocument.withThumbnailFile({
required String media,
required io.File thumbnail,
String? caption,
String? parseMode,
List<MessageEntity>? captionEntities,
bool? disableContentTypeDetection,
}) =>
InputMediaDocument(
type: InputMedia.typeDocument,
media: media,
thumbnail: 'attach://${thumbnail.path}',
caption: caption,
parseMode: parseMode,
captionEntities: captionEntities,
disableContentTypeDetection: disableContentTypeDetection,
)..thumbnailFile = MultipartFile(
thumbnail.path, thumbnail.openRead(), thumbnail.lengthSync(),
filename: thumbnail.path.split('/').last);