InputMediaVideo.fromFileWithThumbnailFile constructor
InputMediaVideo.fromFileWithThumbnailFile({})
Implementation
factory InputMediaVideo.fromFileWithThumbnailFile({
required io.File media,
required io.File thumbnail,
String? caption,
String? parseMode,
List<MessageEntity>? captionEntities,
int? width,
int? height,
int? duration,
bool? supportsStreaming,
bool? hasSpoiler,
}) =>
InputMediaVideo(
media: 'attach://${media.path}',
thumbnail: 'attach://${thumbnail.path}',
caption: caption,
parseMode: parseMode,
captionEntities: captionEntities,
width: width,
height: height,
duration: duration,
supportsStreaming: supportsStreaming,
hasSpoiler: hasSpoiler,
)
..mediaFile = MultipartFile(
media.path, media.openRead(), media.lengthSync(),
filename: media.path.split('/').last)
..thumbnailFile = MultipartFile(
thumbnail.path, thumbnail.openRead(), thumbnail.lengthSync(),
filename: thumbnail.path.split('/').last);