toJson method

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

Implementation

@override
Map<String, dynamic> toJson() => <String, dynamic>{
  'id': id,
  'type': type?.toJson(),
  'title': title,
  'photo': photo?.toJson(),
  'accent_color_id': accentColorId,
  'background_custom_emoji_id': backgroundCustomEmojiId.toString(),
  'upgraded_gift_colors': upgradedGiftColors?.toJson(),
  'profile_accent_color_id': profileAccentColorId,
  'profile_background_custom_emoji_id': profileBackgroundCustomEmojiId
      .toString(),
  'permissions': permissions?.toJson(),
  'last_message': lastMessage?.toJson(),
  'positions': positions.map((item) => item.toJson()).toList(),
  'chat_lists': chatLists.map((item) => item.toJson()).toList(),
  'message_sender_id': messageSenderId?.toJson(),
  'block_list': blockList?.toJson(),
  'has_protected_content': hasProtectedContent,
  'is_translatable': isTranslatable,
  'is_marked_as_unread': isMarkedAsUnread,
  'view_as_topics': viewAsTopics,
  '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,
  'unread_reaction_count': unreadReactionCount,
  'unread_poll_vote_count': unreadPollVoteCount,
  'notification_settings': notificationSettings?.toJson(),
  'available_reactions': availableReactions?.toJson(),
  'message_auto_delete_time': messageAutoDeleteTime,
  'emoji_status': emojiStatus?.toJson(),
  'background': background?.toJson(),
  'theme': theme?.toJson(),
  'action_bar': actionBar?.toJson(),
  'business_bot_manage_bar': businessBotManageBar?.toJson(),
  'video_chat': videoChat?.toJson(),
  'pending_join_requests': pendingJoinRequests?.toJson(),
  'reply_markup_message_id': replyMarkupMessageId,
  'draft_message': draftMessage?.toJson(),
  'client_data': clientData,
  '@type': constructor,
};