checkForUpdate method
Checks AirBuild (via the Shorebird updater) for a new patch on
channel (defaults to the channel this instance was configured
with). Returns UpdateStatus.unavailable if the updater isn't
available rather than throwing.
This makes a network call — don't await it during app startup (e.g.
in initState); call it fire-and-forget with .then() instead, per
Shorebird's own guidance.
Implementation
Future<UpdateStatus> checkForUpdate({String? channel}) async {
if (!isAvailable || await _updatesDisabled()) {
return UpdateStatus.unavailable;
}
return _updater.checkForUpdate(
track: trackForChannel(channel ?? _defaultChannel),
);
}