BloomHttpUpdateAdapter class

Real HTTP and CDN network adapter for checking, downloading, and verifying OTA patches.

Communicates with the Bloom update server (/api/v1/updates/check), downloads patch bundles, verifies cryptographic SHA-256 asset hashes, and stages files to disk.

Example:

final adapter = BloomHttpUpdateAdapter(
  baseUrl: 'https://updates.bloom.dev',
);
Implemented types

Constructors

BloomHttpUpdateAdapter({required String baseUrl, Client? httpClient, Directory? stagingDir, Map<String, String> defaultHeaders = const {}})
Creates a BloomHttpUpdateAdapter.

Properties

baseUrl String
Base API and CDN URL for updates.
final
defaultHeaders Map<String, String>
Default HTTP headers included in update requests.
final
hashCode int
The hash code for this object.
no setterinherited
httpClient → Client
Underlying HTTP client instance.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stagingDir Directory
File system directory where downloaded patches are staged.
final

Methods

checkServerForUpdate({required String channel, required String branch, required String runtimeFingerprint, required String deviceId}) Future<UpdateManifest?>
Queries the update server for an available update manifest matching channel, branch, and runtimeFingerprint.
override
downloadPatchAssets({required UpdateManifest manifest, required void onProgress(double progress)}) Future<bool>
Downloads patch binary assets with onProgress reporting.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
purgeActivePatch() Future<void>
Purges active staged patch from local storage.
override
toString() String
A string representation of this object.
inherited
triggerAppReload() Future<void>
Triggers runtime reload or hot restart to apply staged patch.
override

Operators

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