File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
packages/gotrue/lib/src/types Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,17 @@ class UserAttributes {
40
40
}
41
41
42
42
@override
43
- bool operator == (covariant UserAttributes other) {
43
+ bool operator == (Object other) {
44
44
if (identical (this , other)) return true ;
45
+ if (other is ! UserAttributes ) return false ;
46
+
47
+ final mapEquals = const DeepCollectionEquality ().equals;
45
48
46
49
return other.email == email &&
47
50
other.phone == phone &&
48
51
other.password == password &&
49
52
other.nonce == nonce &&
50
- other.data == data;
53
+ mapEquals ( other.data, data) ;
51
54
}
52
55
53
56
@override
@@ -127,8 +130,10 @@ class AdminUserAttributes extends UserAttributes {
127
130
}
128
131
129
132
@override
130
- bool operator == (covariant AdminUserAttributes other) {
133
+ bool operator == (Object other) {
131
134
if (identical (this , other)) return true ;
135
+ if (other is ! AdminUserAttributes ) return false ;
136
+
132
137
final mapEquals = const DeepCollectionEquality ().equals;
133
138
134
139
return mapEquals (other.userMetadata, userMetadata) &&
@@ -140,7 +145,8 @@ class AdminUserAttributes extends UserAttributes {
140
145
141
146
@override
142
147
int get hashCode {
143
- return userMetadata.hashCode ^
148
+ return super .hashCode ^
149
+ userMetadata.hashCode ^
144
150
appMetadata.hashCode ^
145
151
emailConfirm.hashCode ^
146
152
phoneConfirm.hashCode ^
You can’t perform that action at this time.
0 commit comments