toJson method
Implementation
Map<String, dynamic> toJson() {
return switch (this) {
SdkDependency() => _$SdkDependencyToJson(this as SdkDependency),
GitDependency() => {'git': _$GitDependencyToJson(this as GitDependency)},
PathDependency() =>
throw StateError('Never called due to being overriden'),
HostedDependency() => _$HostedDependencyToJson(this as HostedDependency),
};
}