PubDevClient class
Thin wrapper around the two pub.dev endpoints the readiness checks need.
See SPEC.md §3.1.1: package-name-completion-data returns names "ordered by overall ranking"; the score endpoint carries the tags used to identify Flutter plugins and (in later checks) SwiftPM support.
Constructors
- PubDevClient({Client? httpClient, Uri? baseUri})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fetchArchiveBytes(
Uri archiveUri) → Future< List< int> > - The raw bytes of a package archive (a gzip-compressed tarball).
-
fetchLatestArchiveUrl(
String packageName) → Future< Uri> - The archive URL for a package's latest published version.
-
fetchLatestPackageVersion(
String packageName) → Future< PackageVersion> - The same shape fetchPackageVersion returns, but for a package's current latest version — used when a federated platform package isn't itself locked in the app's pubspec.lock.
-
fetchPackageInfo(
String packageName) → Future< PackageInfo> -
The latest version's version string, publish date and (per plugin
platform) declared platform entry, from
GET /api/packages/<name>. -
fetchPackageNames(
) → Future< List< String> > - All package names known to pub.dev, ordered by overall ranking.
-
fetchPackageScore(
String packageName) → Future< PackageScore> - The score facts recorded for a package's latest version (SPEC §3.1.3): its tags, like count and 30-day download count.
-
fetchPackageTags(
String packageName) → Future< List< String> > -
Score tags for a single package, e.g.
sdk:flutter,platform:ios. -
fetchPackageVersion(
String packageName, String version) → Future< PackageVersion> -
One package's exact published version — its pubspec (for plugin
platform declarations) and archive URL — from
GET /api/packages/<name>/versions/<version>(CLI live-check task, 2026-09-27): unlike fetchPackageInfo, this pins a specific historical version rather than always reading the latest. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
searchPackages(
String query, {required int page}) → Future< List< String> > -
One page of
GET /api/search?q=<query>&sort=downloads&page=<page>results (SPEC §3.1.1, 2026-09-27): 10 package names per page, and pub.dev rejects the query past page 10 (100 results per query). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited