installUpdate method

  1. @override
Future<void> installUpdate({
  1. required String stagingPath,
  2. List<String> removedFiles = const [],
  3. bool allowUnsignedMacOSUpdates = false,
  4. String? diagnosticsLogPath,
})
override

Installs a staged update, then lets the native helper relaunch the app.

Implementation

@override
Future<void> installUpdate({
  required String stagingPath,
  List<String> removedFiles = const [],
  bool allowUnsignedMacOSUpdates = false,
  String? diagnosticsLogPath,
}) async {
  final arguments = <String, Object?>{
    "stagingPath": stagingPath,
    "removedFiles": removedFiles,
    "allowUnsignedMacOSUpdates": allowUnsignedMacOSUpdates,
  };
  if (diagnosticsLogPath != null && diagnosticsLogPath.isNotEmpty) {
    arguments["diagnosticsLogPath"] = diagnosticsLogPath;
  }
  await methodChannel.invokeMethod<void>("installUpdate", arguments);
}