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