toJson method

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

Implementation

@override
Map<String, dynamic> toJson([dynamic extra]) {
  return {
    "@type": CONSTRUCTOR,
    "id": id,
    "sender_id": senderId.toJson(),
    "chat_id": chatId,
    "sending_state": sendingState?.toJson(),
    "scheduling_state": schedulingState?.toJson(),
    "is_outgoing": isOutgoing,
    "is_pinned": isPinned,
    "can_be_edited": canBeEdited,
    "can_be_forwarded": canBeForwarded,
    "can_be_saved": canBeSaved,
    "can_be_deleted_only_for_self": canBeDeletedOnlyForSelf,
    "can_be_deleted_for_all_users": canBeDeletedForAllUsers,
    "can_get_statistics": canGetStatistics,
    "can_get_message_thread": canGetMessageThread,
    "can_get_viewers": canGetViewers,
    "can_get_media_timestamp_links": canGetMediaTimestampLinks,
    "has_timestamped_media": hasTimestampedMedia,
    "is_channel_post": isChannelPost,
    "contains_unread_mention": containsUnreadMention,
    "date": date,
    "edit_date": editDate,
    "forward_info": forwardInfo?.toJson(),
    "interaction_info": interactionInfo?.toJson(),
    "reply_in_chat_id": replyInChatId,
    "reply_to_message_id": replyToMessageId,
    "message_thread_id": messageThreadId,
    "ttl": ttl,
    "ttl_expires_in": ttlExpiresIn,
    "via_bot_user_id": viaBotUserId,
    "author_signature": authorSignature,
    "media_album_id": mediaAlbumId,
    "restriction_reason": restrictionReason,
    "content": content.toJson(),
    "reply_markup": replyMarkup?.toJson(),
  };
}