update method

Future<void> update({
  1. String? channel,
})

Downloads and installs the latest patch on channel (defaults to the channel this instance was configured with). The patch takes effect on the next full app restart — this call does not restart the app for you.

Call checkForUpdate first and only call this when the status is UpdateStatus.outdated, matching Shorebird's own recommended flow.

Implementation

Future<void> update({String? channel}) async {
  if (!isAvailable || await _updatesDisabled()) return;
  return _updater.update(
    track: trackForChannel(channel ?? _defaultChannel),
  );
}