DesktopUpdaterController class

Coordinates update checks, downloads, and install handoff for UI code.

The controller owns the high-level UpdateState used by the ready-made widgets and by custom Flutter UI. Automatic startup checks run quietly and report failures through state; explicit calls such as checkVersion keep throwing so apps can handle user-triggered failures directly.

Inheritance

Constructors

DesktopUpdaterController({required Uri? appArchiveUrl, DesktopUpdateLocalization? localization, bool allowUnsignedMacOSUpdates = false, String channel = "stable", String? installationIdentity, UpdatePreferences? preferences, UpdateRecoveryStore? recoveryStore, String? diagnosticsLogPath, DesktopUpdaterTelemetry? telemetry, MinimumOSSupportChecker? isMinimumOSSupported, UpdateDiagnosticsRecorder? diagnosticsRecorder, Future<void> onProblemReport(UpdateProblemReport report)?, FutureOr<void> onCleanupReport(UpdateCleanupReport report)?, bool skipInitialVersionCheck = false})
Creates a controller for a hosted zip-first app archive.

Properties

activeDescriptor ReleaseDescriptor?
Descriptor selected by the latest successful update check, if any.
no setter
allowUnsignedMacOSUpdates bool
Allows macOS Release installs to bypass native signing, Gatekeeper, stapler, and Team ID checks.
final
appArchiveUrl Uri?
Hosted app-archive.json URL used for update checks.
no setter
appName String?
Name of the app from the active release descriptor, when available.
no setter
appVersion String?
Version from the active release descriptor, when available.
no setter
canReportProblem bool
Whether the app supplied an explicit problem-report callback.
no setter
channel String
Release channel used for update selection and skip preferences.
final
diagnosticsLogPath String?
Optional app-owned native helper diagnostics log path.
final
diagnosticsRecorder UpdateDiagnosticsRecorder
In-memory diagnostics recorder used to build failure reports.
no setter
getLocalization DesktopUpdateLocalization?
Current localization values used by bundled update UI.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
installationIdentity String?
Stable app-owned identity used for deterministic staged rollouts.
final
isMinimumOSSupported MinimumOSSupportChecker?
Optional app-owned minimum OS support policy.
final
lastCleanupReport UpdateCleanupReport?
Most recent install scheduling or cleanup report emitted by this controller.
no setter
localization DesktopUpdateLocalization?
Optional strings used by bundled update UI.
getter/setter pair
preferences UpdatePreferences?
Optional app-owned persistence adapter for skipped versions.
final
recoveryStore UpdateRecoveryStore?
Optional app-owned persistence adapter for pending install recovery.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skipInitialVersionCheck bool
Whether construction should avoid starting the first automatic check.
no setter
skipUpdate bool
Whether the user has skipped the currently offered update in this session.
no setter
state UpdateState
Current update lifecycle state for UI rendering.
no setter
telemetry DesktopUpdaterTelemetry?
Optional app-owned telemetry callback.
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
checkForUpdates() Future<ManualUpdateCheckResult>
Checks for updates for an explicit user action and returns a typed result.
checkVersion() Future<void>
Checks for a newer release and updates state.
dispose() → void
Discards any resources used by the object.
inherited
downloadUpdate() Future<void>
Downloads, verifies, and stages the active release descriptor.
init(Uri url) → void
Sets the app archive URL and starts the initial update check when enabled.
makeSkipUpdate() Future<void>
Marks the currently available update as skipped for this controller.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
recoverPendingInstall() Future<void>
Recovers a pending native install marker from the app-owned store.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
reportProblem(UpdateProblemReport report) Future<void>
Invokes the app-owned problem-report callback when one was supplied.
restartApp() Future<void>
Hands the staged update to the native installer or restart helper.
toString() String
A string representation of this object.
inherited

Operators

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