ReleaseUpdater class

A Release updater from releaseProvider to storage.

Implemented types
Available Extensions

Constructors

ReleaseUpdater(ReleaseStorage storage, ReleaseProvider releaseProvider)

Properties

currentRelease FutureOr<Release?>
Returns the current Release.
no setter
currentReleasePath FutureOr<String?>
Returns the current Release storage path.
no setter
hashCode int
The hash code for this object.
no setterinherited
lastRelease FutureOr<Release?>
Returns the last Release available for name and platform.
no setter
name String
no setter
platform String?
no setter
releaseProvider ReleaseProvider
The Release provider.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage ReleaseStorage
The Release storage.
final

Methods

checkForUpdate({OnRelease? onNewRelease, Release? currentRelease}) FutureOr<Release?>
Checks if there's a new version to update and returns it, otherwise returns null.
copy() ReleaseUpdater
Returns a copy of this instance.
override
currentReleaseFilePath(String filePath) Future<String?>
Returns the current ReleaseFile storage path.
listReleases() FutureOr<List<Release>>
List the releases from releaseProvider.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onSpawned() FutureOr<bool>
Called when an Isolate is spawned and receives a Spawnable instance.
override
startPeriodicUpdateChecker(OnRelease onNewRelease, {Duration? interval, Release? currentRelease}) Timer
Starts a Timer with a periodic call to checkForUpdate.
toString() String
A string representation of this object.
override
update({Release? targetRelease, Version? targetVersion, String? platform, bool exactPlatform = false, bool force = false, bool verbose = false}) FutureOr<ReleaseUpdateResult?>
Updates the release at storage.

Operators

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

Constants

VERSION → const String