toJson method
Converts this object to TDLib JSON.
Implementation
@override
Map<String, dynamic> toJson() => {
'@type': CONSTRUCTOR,
'id': id,
'first_name': firstName,
'last_name': lastName,
'usernames': usernames?.toJson(),
'phone_number': phoneNumber,
'status': status.toJson(),
'profile_photo': profilePhoto?.toJson(),
'accent_color_id': accentColorId,
'background_custom_emoji_id': backgroundCustomEmojiId.toString(),
'profile_accent_color_id': profileAccentColorId,
'profile_background_custom_emoji_id':
profileBackgroundCustomEmojiId.toString(),
'emoji_status': emojiStatus?.toJson(),
'is_contact': isContact,
'is_mutual_contact': isMutualContact,
'is_close_friend': isCloseFriend,
'is_verified': isVerified,
'is_premium': isPremium,
'is_support': isSupport,
'restriction_reason': restrictionReason,
'is_scam': isScam,
'is_fake': isFake,
'has_active_stories': hasActiveStories,
'has_unread_active_stories': hasUnreadActiveStories,
'restricts_new_chats': restrictsNewChats,
'have_access': haveAccess,
'type': type.toJson(),
'language_code': languageCode,
'added_to_attachment_menu': addedToAttachmentMenu,
};