flutter_ota_kit_client 0.1.4
flutter_ota_kit_client: ^0.1.4 copied to clipboard
Server-API client for flutter_ota_kit — maps the hot-updater-compatible update-check HTTP contract to a PatchInfo the device SDK can install.
flutter_ota_kit_client #
The shared result type used by every flutter_ota_kit update check.
What's inside #
ServerUpdateResult— the uniform object returned by every backend source (SupabaseUpdateSource,PostgresUpdateSource,CloudflareUpdateSource,AwsUpdateSource) so application code can treat all backends the same.
import 'package:flutter_ota_kit_client/flutter_ota_kit_client.dart';
final result = await FlutterPatcher.checkForUpdate();
if (result.hasUpdate) {
await FlutterPatcher.applyUpdate(result);
}
ServerUpdateResult exposes isUpToDate, hasUpdate, patch (a PatchInfo),
status (update / rollback / upToDate), and shouldForceUpdate — a forced
update is applied and the app restarted automatically by applyUpdate.
License #
MIT.