@@ -90,9 +90,7 @@ Dependency? _fromJson(Object? data, String name) {
90
90
return null ;
91
91
}
92
92
93
- abstract class Dependency {
94
- Dependency ._();
95
-
93
+ sealed class Dependency {
96
94
String get _info;
97
95
98
96
@override
@@ -106,8 +104,7 @@ class SdkDependency extends Dependency {
106
104
final VersionConstraint version;
107
105
108
106
SdkDependency (this .sdk, {VersionConstraint ? version})
109
- : version = version ?? VersionConstraint .any,
110
- super ._();
107
+ : version = version ?? VersionConstraint .any;
111
108
112
109
@override
113
110
String get _info => sdk;
@@ -127,7 +124,7 @@ class GitDependency extends Dependency {
127
124
final String ? ref;
128
125
final String ? path;
129
126
130
- GitDependency (this .url, {this .ref, this .path}) : super ._() ;
127
+ GitDependency (this .url, {this .ref, this .path});
131
128
132
129
factory GitDependency .fromData (Object ? data) {
133
130
if (data is String ) {
@@ -194,7 +191,7 @@ Uri? _tryParseScpUri(String value) {
194
191
class PathDependency extends Dependency {
195
192
final String path;
196
193
197
- PathDependency (this .path) : super ._() ;
194
+ PathDependency (this .path);
198
195
199
196
factory PathDependency .fromData (Object ? data) {
200
197
if (data is String ) {
@@ -223,8 +220,7 @@ class HostedDependency extends Dependency {
223
220
final HostedDetails ? hosted;
224
221
225
222
HostedDependency ({VersionConstraint ? version, this .hosted})
226
- : version = version ?? VersionConstraint .any,
227
- super ._();
223
+ : version = version ?? VersionConstraint .any;
228
224
229
225
@override
230
226
String get _info => version.toString ();
0 commit comments