DesktopUpdaterController constructor
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,
- ReleaseNotesLoader? releaseNotesLoader,
- Uri? releaseNotesUrl,
Creates a controller for a hosted zip-first app archive.
When appArchiveUrl is provided and skipInitialVersionCheck is false,
the controller starts an asynchronous update check during construction.
Implementation
DesktopUpdaterController({
required Uri? appArchiveUrl,
this.localization,
this.allowUnsignedMacOSUpdates = false,
this.channel = "stable",
this.installationIdentity,
this.preferences,
this.recoveryStore,
this.diagnosticsLogPath,
this.telemetry,
this.isMinimumOSSupported,
UpdateDiagnosticsRecorder? diagnosticsRecorder,
Future<void> Function(UpdateProblemReport report)? onProblemReport,
FutureOr<void> Function(UpdateCleanupReport report)? onCleanupReport,
bool skipInitialVersionCheck = false,
ReleaseNotesLoader? releaseNotesLoader,
Uri? releaseNotesUrl,
}) : _skipInitialVersionCheck = skipInitialVersionCheck,
_diagnosticsRecorder =
diagnosticsRecorder ?? UpdateDiagnosticsRecorder(channel: channel),
_onProblemReport = onProblemReport,
_onCleanupReport = onCleanupReport,
_releaseNotesLoader = releaseNotesLoader,
_releaseNotesUrl = releaseNotesUrl,
_releaseNotesFetcher =
releaseNotesUrl == null ? null : ReleaseNotesFetcher() {
if (appArchiveUrl != null) {
init(appArchiveUrl);
}
}