toJson method
Implementation
@override
Map<String, dynamic> toJson([dynamic extra]) {
return {
"@type": CONSTRUCTOR,
"id": id,
"type": type.toJson(),
"title": title,
"photo": photo?.toJson(),
"permissions": permissions.toJson(),
"last_message": lastMessage?.toJson(),
"positions": positions.map((i) => i.toJson()).toList(),
"message_sender_id": messageSenderId?.toJson(),
"has_protected_content": hasProtectedContent,
"is_marked_as_unread": isMarkedAsUnread,
"is_blocked": isBlocked,
"has_scheduled_messages": hasScheduledMessages,
"can_be_deleted_only_for_self": canBeDeletedOnlyForSelf,
"can_be_deleted_for_all_users": canBeDeletedForAllUsers,
"can_be_reported": canBeReported,
"default_disable_notification": defaultDisableNotification,
"unread_count": unreadCount,
"last_read_inbox_message_id": lastReadInboxMessageId,
"last_read_outbox_message_id": lastReadOutboxMessageId,
"unread_mention_count": unreadMentionCount,
"notification_settings": notificationSettings.toJson(),
"message_ttl": messageTtl,
"theme_name": themeName,
"action_bar": actionBar?.toJson(),
"video_chat": videoChat.toJson(),
"pending_join_requests": pendingJoinRequests?.toJson(),
"reply_markup_message_id": replyMarkupMessageId,
"draft_message": draftMessage?.toJson(),
"client_data": clientData,
};
}