PubClient class

Lightweight pub.flutter-io.cn API client.

Constructors

PubClient({String registryUrl = 'https://pub.flutter-io.cn', Client? httpClient})

Properties

hashCode int
The hash code for this object.
no setterinherited
registryUrl String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → void
downloadPackage(String packageName, String version, {String? archiveUrl}) Future<Directory>
Download and extract a package archive to a temporary directory. Returns the path to the extracted package root.
getVersions(String packageName) Future<List<PubVersionInfo>>
Fetch all versions of a package.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveVersion(String packageName, String constraint) Future<PubVersionInfo>
Resolve a semver constraint to the best (highest) matching version.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited