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