copyWith method

PackageMetadata copyWith({
  1. RepoHealth? repoHealth,
})

Returns a copy of this metadata with repoHealth replaced.

Implementation

PackageMetadata copyWith({RepoHealth? repoHealth}) => PackageMetadata(
      name: name,
      currentVersion: currentVersion,
      latestVersion: latestVersion,
      latestStableVersion: latestStableVersion,
      repositoryUrl: repositoryUrl,
      issueTrackerUrl: issueTrackerUrl,
      publisherDomain: publisherDomain,
      pubScore: pubScore,
      pubPopularity: pubPopularity,
      pubLikes: pubLikes,
      sdkConstraint: sdkConstraint,
      flutterConstraint: flutterConstraint,
      isNullSafe: isNullSafe,
      isDiscontinued: isDiscontinued,
      isUnlisted: isUnlisted,
      releases: releases,
      topics: topics,
      verification: verification,
      repoHealth: repoHealth ?? this.repoHealth,
      fetchedAt: fetchedAt,
      isFromCache: isFromCache,
    );