toJson method

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

Converts an InlineQueryResultCachedVoice object to a JSON map

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    'type': type.value,
    'voice_file_id': voiceFileId,
    'title': title,
    'caption': caption,
    'parse_mode': parseMode?.value,
    'caption_entities': captionEntities?.map((e) => e.toJson()).toList(),
    'reply_markup': replyMarkup?.toJson(),
    'input_message_content': inputMessageContent?.toJson(),
    'id': id,
  }..removeWhere(_nullFilter);
}