toJson method

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

Converts this request to TDLib JSON, tagged with extra if given.

Implementation

@override
Map<String, dynamic> toJson([dynamic extra]) => {
      '@type': CONSTRUCTOR,
      'chat_id': chatId,
      'message_thread_id': messageThreadId,
      'reply_to': replyTo?.toJson(),
      'options': options?.toJson(),
      'query_id': queryId.toString(),
      'result_id': resultId,
      'hide_via_bot': hideViaBot,
      if (extra != null) '@extra': extra,
    };