desktop_updater library

Classes

DesktopUpdateDirectCard
Shows the ready-made update card directly when controller state needs it.
DesktopUpdateLocalization
Localization for the update card texts.
DesktopUpdateLocalizationLoader
Loads desktop updater localization from bundled or app-owned JSON assets.
DesktopUpdater
Entry point for platform update helpers and zip-first update operations.
DesktopUpdaterController
Coordinates update checks, downloads, and install handoff for UI code.
DesktopUpdaterInheritedNotifier
Exposes a DesktopUpdaterController to ready-made or custom update UI.
DesktopUpdateSliver
A sliver that reveals the ready-made update card when an update is active.
DesktopUpdateWidget
Wraps app content with the ready-made update sliver experience.
DesktopVersionInfo
Parsed desktop app version metadata used for update ordering.
MacOSInstallLocationStatus
Native macOS install-location status.
MacOSMoveToApplicationsPrompt
Opt-in wrapper that offers to move a macOS app into /Applications.
ManualUpdateCheckAvailable
A newer release is available and the controller state has been updated.
ManualUpdateCheckBlockedBySupportPolicy
The current app version is past the support-policy deadline.
ManualUpdateCheckFailed
The update check failed before a final available or up-to-date result.
ManualUpdateCheckFreshInstallRequired
A newer release is available but requires a fresh download.
ManualUpdateCheckResult
Result returned by an explicit user-triggered update check.
ManualUpdateCheckUpToDate
No newer release is available for the current app, platform, and channel.
NativeInstallTransactionStatus
Read-only native helper status used by optional recovery UX.
ReleaseArtifact
Download metadata for the artifact referenced by a descriptor.
ReleaseAuthenticodePolicy
Authenticode trust requirements for a Windows installer artifact.
ReleaseDeltaArtifact
Descriptor metadata for a future delta update artifact.
ReleaseDescriptor
Parsed release.json metadata for one platform-specific update artifact.
ReleaseFreshInstall
Item-level policy requiring users to download a fresh installer.
ReleaseIndex
Parsed app-archive.json index for zip-first update discovery.
ReleaseIndexItem
One selectable release entry inside an app archive index.
ReleaseInnoInstall
Windows Inno Setup installer execution policy from release.json.
ReleaseInstall
Install metadata for a staged release artifact.
ReleaseMacOSDmgInstall
macOS DMG update metadata from release.json.
ReleaseMacOSPkgInstall
macOS PKG installer metadata from release.json.
ReleaseNotes
Parsed release notes from a hosted JSON object.
ReleaseNotesEntry
One entry in a hosted release notes document.
ReleaseNotesFailed
Release notes loading failed.
ReleaseNotesIdle
No release notes request has started.
ReleaseNotesItem
One item inside a release notes section.
ReleaseNotesLoaded
Release notes loaded successfully.
ReleaseNotesLoading
Release notes are being loaded.
ReleaseNotesSection
A typed release notes section.
ReleaseNotesState
State for optional release notes loading.
ReleaseRollout
Deterministic staged rollout settings for a release index item.
ReleaseSignature
Signature metadata embedded in a release descriptor.
ReleaseSupportPolicy
App-wide minimum supported version policy from app-archive.json.
UpdateAvailable
A release newer than the installed app is available.
UpdateBlockedBySupportPolicy
The current app version is past the support deadline.
UpdateCard
A ready-made Material card for the desktop update flow.
UpdateChecking
The controller is checking the hosted app archive for a newer release.
UpdateCheckResult
Successful update-check result with the selected index item and descriptor.
UpdateCleanupReport
Small report emitted after install scheduling or cleanup evidence.
UpdateDiagnosticEntry
A single structured diagnostics entry for the update lifecycle.
UpdateDiagnosticsRecorder
In-memory diagnostics recorder for updater lifecycle events.
UpdateDiagnosticsSink
Optional app-owned sink for receiving retained diagnostics entries.
UpdateDialogListener
Listens for available updates and presents them in a dialog.
UpdateDialogWidget
A widget that shows an update dialog.
UpdateDownloading
The selected update artifact is being downloaded and verified.
UpdateFailed
The most recent update check, download, verification, or install failed.
UpdateFreshInstallRequired
A newer release exists but must be installed from a fresh download.
UpdateIdle
No update operation is currently active.
UpdateInstalling
The native install or restart helper is running.
UpdateInstallRecoveryMarker
Marker persisted by an app-owned store before native install handoff.
UpdatePreferences
App-owned persistence adapter for update preferences.
UpdateProblemReport
Locally generated, user-copyable update problem report.
UpdateProblemReportDialog
Desktop-style update problem report dialog.
UpdateReadyToInstall
The update artifact has been staged and can be installed.
UpdateRecoveryStore
App-owned persistence adapter for pending native install recovery markers.
UpdateStageResult
Result returned after a release artifact has been verified and staged.
UpdateState
Base type for the updater lifecycle states exposed by the controller.
UpdateTelemetryEvent
App-consumable telemetry payload for updater lifecycle events.
ZipFirstUpdateSession
Per-client zip-first update session.

Enums

DesktopUpdateLocalizationKey
Stable string keys used by resolver-based localization.
MacOSInstallLocationKind
macOS app install-location category.
MandatoryReadyToInstallBehavior
Controls mandatory ready-to-install behavior in dialog-based update UI.
NativeInstallTransactionResultCode
Result code reported by the authenticated native install helper.
NativeInstallTransactionState
State reported by the authenticated native install helper.
ReleaseNotesSectionType
Section type used by the richer release notes model.
UpdateDiagnosticLevel
Severity for a structured updater diagnostics entry.
UpdateDiagnosticStage
Lifecycle area associated with an updater diagnostics entry.
UpdateTelemetryEventType
Typed update telemetry event names emitted by the updater.

Constants

defaultDesktopUpdateLocalization → const DesktopUpdateLocalization
Built-in English localization values used as the canonical fallback.
macOSPrivilegedHelperApprovalRequiredErrorCode → const String
Stable native error code emitted when macOS requires helper approval.

Functions

classifyMacOSInstallLocation(String? bundlePath) MacOSInstallLocationKind
Classifies a macOS .app bundle path for move-prompt policy.
defaultExternalUrlLauncher(Uri url) Future<void>
Default desktop URL launcher used by ready-made fresh-install UI.
desktopUpdateLocalizationFromJson(Map<String, Object?> raw) DesktopUpdateLocalization
Converts a decoded localization JSON object into localization overrides.
emitUpdateTelemetry(DesktopUpdaterTelemetry? telemetry, UpdateTelemetryEvent event) → void
Emits event to telemetry and ignores telemetry sink failures.
formatDesktopUpdateDateTime(DateTime dateTime, {DesktopUpdateLocalization? localization}) String
Formats a date with the localization override or the package default.
getLocalizedString(String? key, List args) String?
Replaces {} placeholders in key with the provided args.
isMacOSPrivilegedHelperApprovalRequiredError(Object error) bool
Whether error reports the macOS privileged helper approval gate.
mergeDesktopUpdateLocalizations(DesktopUpdateLocalization base, DesktopUpdateLocalization overrides) DesktopUpdateLocalization
Returns a merged localization where overrides wins over base.
parseDesktopUpdateLocalizationJson(String raw) DesktopUpdateLocalization
Parses a localization JSON string into a localization override object.
selectReleaseIndexItem({required ReleaseIndex index, required String platform, required DesktopVersionInfo currentVersion, String channel = "stable", String? installationIdentity}) ReleaseIndexItem?
Selects the newest matching release for platform, channel, and version.
showManualUpdateCheckResultDialog(BuildContext context, {required DesktopUpdaterController controller, required ManualUpdateCheckResult result, bool showAvailableUpdate = false, Color? backgroundColor, Color? iconColor, Color? shadowColor, Color? textColor, Color? buttonTextColor, MandatoryReadyToInstallBehavior mandatoryReadyToInstallBehavior = MandatoryReadyToInstallBehavior.promptToSaveFirst}) Future<void>
Shows optional Material feedback for a user-triggered update check result.
showReleaseNotesBottomSheet(BuildContext context, {DesktopUpdaterController? controller, DesktopUpdaterController? notifier}) Future<void>
Opens a modal bottom sheet displaying the hosted release notes.
showUpdateDialog<T>(BuildContext context, {required DesktopUpdaterController controller, Color? backgroundColor, Color? iconColor, Color? shadowColor, MandatoryReadyToInstallBehavior mandatoryReadyToInstallBehavior = MandatoryReadyToInstallBehavior.promptToSaveFirst}) Future
Shows an update dialog.
showUpdateProblemReportDialog(BuildContext context, {required DesktopUpdaterController controller, required UpdateProblemReport report}) Future<void>
Shows a Material problem report dialog for a failed update.
sortJsonValue(Object? value) Object?
Recursively sorts JSON map keys for deterministic descriptor signing.

Typedefs

DesktopUpdateDateTimeFormatter = String Function(DateTime dateTime)
Formats updater dates before they are inserted into localized strings.
DesktopUpdaterTelemetry = void Function(UpdateTelemetryEvent event)
Optional callback type for app-owned update telemetry.
DesktopUpdateTextResolver = String? Function(DesktopUpdateLocalizationKey key, String fallback)
Resolves a desktop updater localization key into an app-owned translation.
ExternalUrlLauncher = Future<void> Function(Uri url)
Opens an external URL, such as a fresh installer download page.
MacOSInstallLocationStatusLoader = Future<MacOSInstallLocationStatus> Function()
Loads macOS install-location status.
MacOSMoveToApplicationsMover = Future<void> Function({required bool replaceExisting})
Moves the running macOS app to /Applications.
MinimumOSSupportChecker = bool Function({required String minimumOS, required String platform})
App-owned policy callback for descriptor minimumOS checks.
ReleaseNotesLoader = Future<ReleaseNotes> Function(ReleaseDescriptor descriptor)
Loads release notes for the selected update descriptor.
UpdateRequestHeadersProvider = FutureOr<Map<String, String>> Function(Uri source)
Provides app-owned HTTP headers for one update metadata or artifact request.