toJson method

  1. @override
Map<String, dynamic> toJson()
override

Converts an InlineQueryResultDocument object to a JSON map

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    'type': type.value,
    'title': title,
    'document_url': documentUrl,
    'mime_type': mimeType,
    'caption': caption,
    'parse_mode': parseMode?.value,
    'caption_entities': captionEntities?.map((e) => e.toJson()).toList(),
    'description': description,
    'reply_markup': replyMarkup?.toJson(),
    'input_message_content': inputMessageContent?.toJson(),
    'thumbnail_url': thumbnailUrl,
    'thumbnail_width': thumbnailWidth,
    'thumbnail_height': thumbnailHeight,
    'id': id,
  }..removeWhere(_nullFilter);
}