autoupdater library

A fully configurable auto-update plugin for Flutter apps.

This plugin provides automatic update checking, APK downloading, and installation support for Android apps. It's framework-agnostic and works with any state management solution (GetX, Provider, Bloc, Riverpod, or none).

import 'package:releasehub_updater/autoupdater.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Initialize with ReleaseHub backend
  await AutoUpdater.init(
    baseUrl: 'https://app.v2.sk',
    projectSlug: 'my-app',
    channel: 'stable',
  );

  runApp(MyApp());
}

// Manual check (e.g., from settings screen)
AutoUpdater.checkForUpdates();

Advanced Usage

For more control, use AutoUpdaterStandalone directly:

import 'package:releasehub_updater/autoupdater_standalone.dart';

final updater = AutoUpdaterStandalone(
  config: AutoUpdaterConfig.releaseHub(
    baseUrl: 'https://app.v2.sk',
    projectSlug: 'my-app',
  ),
  ui: AutoUpdaterDefaultUI.create(primaryColor: Colors.blue),
);
await updater.initialize();

Features

  • Automatic update checking on startup (configurable)
  • Manual update checking
  • APK download with progress tracking
  • Automatic installation triggering
  • Permission handling for Android
  • Built-in UI dialogs (no callbacks needed)
  • Architecture-aware APK selection

Classes

AutoUpdater
Simple static API for the auto-updater.
AutoUpdaterConfig
Configuration for the auto-updater plugin.
AutoUpdaterCore
Core auto-updater service (framework-agnostic).
AutoUpdaterDefaultUI
Pre-built UI handlers using Flutter's built-in dialogs and snackbars.
AutoUpdaterStandalone
Standalone auto-updater service using Flutter's built-in ValueNotifier.
AutoUpdaterStandaloneUI
UI callbacks for the standalone auto-updater.
AutoUpdaterStrings
Customizable strings for the auto-updater UI.
CurrentVersionInfo
Current app version information
DownloadCancelled
DownloadError
DownloadProgress
Download progress information
DownloadProgressStyle
Style configuration for DownloadProgressWidget
DownloadProgressWidget
A customizable download progress widget.
DownloadResult
Download result
DownloadSuccess
InstallError
InstallManualRequired
InstallPermissionDenied
InstallResult
Installation result
InstallSuccess
NoUpdateAvailable
UpdateAvailable
UpdateAvailableBanner
A simple update available banner widget.
UpdateBannerStyle
Style configuration for UpdateAvailableBanner
UpdateCheckDisabled
UpdateCheckError
UpdateCheckResult
Update check result
VersionCheckButton
A version check button widget with loading state.
VersionCheckButtonStyle
Style configuration for VersionCheckButton
VersionInfo
Parsed version information from the server
VersionResponseFields
Configuration for parsing the version check JSON response. Allows customization of field names for different backend implementations.