install method

Future<void> install(
  1. String id,
  2. ResourceHandle handle, {
  3. Set<FwupdInstallFlag> flags = const {},
})

Schedule a firmware to be installed.

Implementation

Future<void> install(
  String id,
  ResourceHandle handle, {
  Set<FwupdInstallFlag> flags = const {},
}) async {
  var options = DBusDict.stringVariant({
    'offline': DBusBoolean(flags.contains(FwupdInstallFlag.offline)),
    'allow-reinstall':
        DBusBoolean(flags.contains(FwupdInstallFlag.allowReinstall)),
    'allow-older': DBusBoolean(flags.contains(FwupdInstallFlag.allowOlder)),
    'force': DBusBoolean(flags.contains(FwupdInstallFlag.force)),
    'no-history': DBusBoolean(flags.contains(FwupdInstallFlag.noHistory)),
    'allow-branch-switch':
        DBusBoolean(flags.contains(FwupdInstallFlag.allowBranchSwitch)),
    'ignore-power': DBusBoolean(flags.contains(FwupdInstallFlag.ignorePower)),
  });
  await _callMethod('Install', [DBusString(id), DBusUnixFd(handle), options],
      replySignature: DBusSignature.empty);
}