ReleaseUpdater class

A Release updater from releaseProvider to storage.

Implemented types
Available extensions

Constructors

ReleaseUpdater.new(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
runReleaseProcess(String executable, List<String> arguments, {String? workingDirectory, Map<String, String>? environment}) Future<ProcessResult?>

Available on ReleaseUpdater, provided by the ReleaseUpdaterIOExtension extension

Runs a Process using an executable inside the current release path.
spawnPeriodicUpdateCheckerIsolate(OnRelease onNewRelease, {Duration? interval, Release? currentRelease}) Future<bool>

Available on ReleaseUpdater, provided by the ReleaseUpdaterIsolateExtension extension

Spawns an Isolate with a periodic call to checkForUpdate.
startPeriodicUpdateChecker(OnRelease onNewRelease, {Duration? interval, Release? currentRelease}) Timer
Starts a Timer with a periodic call to checkForUpdate.
startReleaseProcess(String executable, List<String> arguments, {String? workingDirectory, Map<String, String>? environment, ProcessStartMode mode = ProcessStartMode.normal}) Future<Process?>

Available on ReleaseUpdater, provided by the ReleaseUpdaterIOExtension extension

Starts a Process using an executable inside the current release path.
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