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