BloomOTA class

Over-The-Air (OTA) update and code-push controller powered by Shorebird.

Manages background update checks, patch downloads, and release channel management.

Example:

await BloomOTA.initialize(channel: 'production');
final hasUpdate = await BloomOTA.checkForUpdate();
if (hasUpdate) {
  await BloomOTA.downloadUpdate();
}

Constructors

BloomOTA()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

activeChannel → String
Active OTA deployment channel.
no setter
activePatchId → String?
Active Shorebird patch identifier string (e.g. 'patch_1', or null if base release).
no setter
availablePatch → BloomOtaPatch?
The latest available patch (if downloaded or available).
no setter
currentPatchNumber → int?
Currently active Shorebird patch number (null if running vanilla release).
no setter
currentStatus → BloomOtaStatus
Current OTA status.
no setter
isAvailable → bool
Whether the app is currently running on the Shorebird engine with OTA support.
no setter
onStatusChanged → Stream<BloomOtaStatus>
Stream of OTA status updates.
no setter

Static Methods

checkForUpdate({Future<BloomOtaPatch?> customChecker()?}) → Future<bool>
Check if a newer OTA code-push patch is available on the active channel.
downloadUpdate({Future<bool> customDownloader()?}) → Future<bool>
Trigger patch download and staging using the Shorebird engine.
initialize({String channel = 'production', int? currentPatch}) → Future<void>
Initializes the OTA runtime with active deployment channel and reads the installed patch.
reset() → void
Reset internal state (useful in testing).