toJson method
Implementation
@override
Map<String, dynamic> toJson() => <String, dynamic>{
'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(),
'upgraded_gift_colors': upgradedGiftColors?.toJson(),
'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,
'verification_status': verificationStatus?.toJson(),
'is_premium': isPremium,
'is_support': isSupport,
'restriction_info': restrictionInfo?.toJson(),
'active_story_state': activeStoryState?.toJson(),
'restricts_new_chats': restrictsNewChats,
'paid_message_star_count': paidMessageStarCount,
'have_access': haveAccess,
'type': type?.toJson(),
'language_code': languageCode,
'added_to_attachment_menu': addedToAttachmentMenu,
'@type': constructor,
};