toJson method
override
Object to Map serializer
Implementation
@override
Map<String, dynamic> toJson() {
return {
'@type': 'user',
if (extra != null) '@extra': extra,
'id': id,
'first_name': first_name,
'last_name': last_name,
'usernames': usernames,
'phone_number': phone_number,
'status': status,
'profile_photo': profile_photo,
'emoji_status': emoji_status,
'is_contact': is_contact,
'is_mutual_contact': is_mutual_contact,
'is_close_friend': is_close_friend,
'is_verified': is_verified,
'is_premium': is_premium,
'is_support': is_support,
'restriction_reason': restriction_reason,
'is_scam': is_scam,
'is_fake': is_fake,
'has_active_stories': has_active_stories,
'has_unread_active_stories': has_unread_active_stories,
'have_access': have_access,
'type': type,
'language_code': language_code,
'added_to_attachment_menu': added_to_attachment_menu
};
}