fetchLatestRelease static method

Future<PackageVersion?> fetchLatestRelease(
  1. String package
)

Fetch the latest release for a package

Implementation

static Future<PackageVersion?> fetchLatestRelease(String package) async {
  try {
    final info = await _pub.packageInfo(package);
    return info.latest;
  } catch (e) {
    return null;
  }
}