toJson method

ToJsonType toJson()

Implementation

ToJsonType 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,
        ),
      }
      as ToJsonType;
}