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