@@ -19,26 +19,26 @@ class UserModel {
19
19
List <String > followersList;
20
20
List <String > followingList;
21
21
22
- UserModel ({
23
- this .email,
24
- this .userId,
25
- this .displayName,
26
- this .profilePic,
27
- this .bannerImage,
28
- this .key,
29
- this .contact,
30
- this .bio,
31
- this .dob,
32
- this .location,
33
- this .createdAt,
34
- this .userName,
35
- this .followers,
36
- this .following,
37
- this .webSite,
38
- this .isVerified,
39
- this .fcmToken,
40
- this .followersList,
41
- });
22
+ UserModel (
23
+ { this .email,
24
+ this .userId,
25
+ this .displayName,
26
+ this .profilePic,
27
+ this .bannerImage,
28
+ this .key,
29
+ this .contact,
30
+ this .bio,
31
+ this .dob,
32
+ this .location,
33
+ this .createdAt,
34
+ this .userName,
35
+ this .followers,
36
+ this .following,
37
+ this .webSite,
38
+ this .isVerified,
39
+ this .fcmToken,
40
+ this .followersList,
41
+ this .followingList });
42
42
43
43
UserModel .fromJson (Map <dynamic , dynamic > map) {
44
44
if (map == null ) {
@@ -65,14 +65,14 @@ class UserModel {
65
65
fcmToken = map['fcmToken' ];
66
66
isVerified = map['isVerified' ] ?? false ;
67
67
if (map['followerList' ] != null ) {
68
- followersList = List <String >() ;
68
+ followersList = < String > [] ;
69
69
map['followerList' ].forEach ((value) {
70
70
followersList.add (value);
71
71
});
72
72
}
73
73
followers = followersList != null ? followersList.length : null ;
74
74
if (map['followingList' ] != null ) {
75
- followingList = List <String >() ;
75
+ followingList = < String > [] ;
76
76
map['followingList' ].forEach ((value) {
77
77
followingList.add (value);
78
78
});
@@ -122,6 +122,7 @@ class UserModel {
122
122
bool isVerified,
123
123
String fcmToken,
124
124
List <String > followingList,
125
+ List <String > followersList,
125
126
}) {
126
127
return UserModel (
127
128
email: email ?? this .email,
@@ -142,6 +143,7 @@ class UserModel {
142
143
webSite: webSite ?? this .webSite,
143
144
fcmToken: fcmToken ?? this .fcmToken,
144
145
followersList: followersList ?? this .followersList,
146
+ followingList: followingList ?? this .followingList,
145
147
);
146
148
}
147
149
0 commit comments