@@ -111,6 +111,13 @@ class SdkDependency extends Dependency {
111
111
112
112
@override
113
113
String get _info => sdk;
114
+
115
+ @override
116
+ bool operator == (Object other) =>
117
+ other is SdkDependency && other.sdk == sdk && other.version == version;
118
+
119
+ @override
120
+ int get hashCode => Object .hash (sdk, version);
114
121
}
115
122
116
123
@JsonSerializable ()
@@ -136,6 +143,16 @@ class GitDependency extends Dependency {
136
143
137
144
@override
138
145
String get _info => 'url@$url ' ;
146
+
147
+ @override
148
+ bool operator == (Object other) =>
149
+ other is GitDependency &&
150
+ other.url == url &&
151
+ other.ref == ref &&
152
+ other.path == path;
153
+
154
+ @override
155
+ int get hashCode => Object .hash (url, ref, path);
139
156
}
140
157
141
158
Uri ? parseGitUriOrNull (String ? value) =>
@@ -188,6 +205,13 @@ class PathDependency extends Dependency {
188
205
189
206
@override
190
207
String get _info => 'path@$path ' ;
208
+
209
+ @override
210
+ bool operator == (Object other) =>
211
+ other is PathDependency && other.path == path;
212
+
213
+ @override
214
+ int get hashCode => path.hashCode;
191
215
}
192
216
193
217
@JsonSerializable (disallowUnrecognizedKeys: true )
@@ -204,6 +228,15 @@ class HostedDependency extends Dependency {
204
228
205
229
@override
206
230
String get _info => version.toString ();
231
+
232
+ @override
233
+ bool operator == (Object other) =>
234
+ other is HostedDependency &&
235
+ other.version == version &&
236
+ other.hosted == hosted;
237
+
238
+ @override
239
+ int get hashCode => Object .hash (version, hosted);
207
240
}
208
241
209
242
@JsonSerializable (disallowUnrecognizedKeys: true )
@@ -240,6 +273,13 @@ class HostedDetails {
240
273
241
274
throw ArgumentError .value (data, 'hosted' , 'Must be a Map or String.' );
242
275
}
276
+
277
+ @override
278
+ bool operator == (Object other) =>
279
+ other is HostedDetails && other.name == name && other.url == url;
280
+
281
+ @override
282
+ int get hashCode => Object .hash (name, url);
243
283
}
244
284
245
285
VersionConstraint _constraintFromString (String ? input) =>
0 commit comments