PackageVersion class abstract

A class that provides methods to fetch, store and validate the latest package version with reasonable caching.

Constructors

PackageVersion()

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

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

Static Methods

fetchLatestPackageVersion({required Future<void> storePackageVersionData(PackageVersionData versionArtefact), required Future<PackageVersionData?> loadPackageVersionData(), required Future<Version?> fetchLatestPackageVersion()}) Future<Version?>
Fetches the latest package version. If the stored version exists and is valid, it will be returned. Otherwise, the latest version will be fetched. If the fetch is successful the version will be stored and returned with a validity time of PackageVersionConstants.localStorageValidityTime.