toJson method
Implementation
Map<String, dynamic> toJson() {
final _data = {
'uid': uid,
'name': name,
'user_name': userName,
'email': email,
'photo': photo,
'phone': phone,
'country': country,
'bio': bio,
'gender': gender.index,
'dob': dob,
'profession': profession,
'online_status': onlineStatus.index,
'last_online_at': lastOnlineAt,
'feeds': feeds,
'photos': photos,
'videos': videos,
'followers': followers,
'following': following,
'search_keys': searchKeys,
'reactions_received_from_feeds': reactionsReceivedFromFeeds,
'comments_received_from_feeds': commentsReceivedFromFeeds,
'replies_received_from_feeds': repliesReceivedFromFeeds,
'shares_received_from_feeds': sharesReceivedFromFeeds,
'views_received_from_feeds': viewsReceivedFromFeeds,
'admin': admin,
'editor': editor,
'tester': tester,
'onboarding_step': onboardingStep,
'onboarding_completed': onboardingCompleted,
'latitude': latitude,
'longitude': longitude,
'created_at': createdAt,
'visibility': visibility,
...extraData,
};
_data.removeWhere((key, value) => value == null);
return _data;
}