PrismUpdateController class

Headless controller that checks versions and exposes an update state.

Platform-agnostic: works on Android, iOS, web, and Windows. The UI layer (PrismUpdateGate, PrismForceUpdateScreen, PrismSoftUpdateCard) renders whatever this controller reports.

When a skipStore is provided, previously skipped soft updates are reported as PrismUpdateSkipped instead of PrismUpdateAvailable — forced updates are never suppressed.

Inheritance

Constructors

PrismUpdateController({required PrismUpdateSource source, UpdatePolicy policy = const UpdatePolicy(), required PrismVersion currentVersion, PrismUpdatePlatformInfo? platformInfo, bool autoCheck = true, PrismSkipStore? skipStore})
Creates a controller.

Properties

autoCheck → bool
Whether a check runs automatically on construction.
final
currentVersion → PrismVersion
Version of the currently running app.
final
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
platformInfo → PrismUpdatePlatformInfo
Platform information used for URL and flow selection.
final
policy → UpdatePolicy
Policy used to evaluate decisions.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → PrismUpdateState
The current state.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
checkNow({bool ignoreSkips = false}) → Future<void>
Runs a version check and updates state.
clearSkipAndRecheck(PrismVersion version) → Future<void>
Clears the skip for version and re-checks.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
skipCurrentUpdate() → Future<void>
Marks the currently offered soft update as skipped.
toString() → String
A string representation of this object.
inherited

Operators

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