PubDevClient class
Thin wrapper around the pub.dev package API. Kept as a small, overridable class (rather than free functions) so audits can be tested against a fake implementation instead of hitting the network.
Constructors
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
-
fetchMetrics(
String name) → Future< Map< String, dynamic> ?> -
GET https://pub.dev/api/packages/<name>/metrics— returns pub.dev's score tags, includingis:discontinued,is:null-safe, andlicense:<spdx-id>, or null if unavailable. -
fetchPackageInfo(
String name) → Future< Map< String, dynamic> ?> -
GET https://pub.dev/api/packages/<name>— returns the latest published version and its pubspec, or null if the package isn't found or the request fails. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited