autoupdater_getx library
GetX adapter for the autoupdater plugin.
This export includes the GetX-specific AutoUpdaterGetxService which provides reactive state management and integrates with GetX navigation.
Usage
import 'package:releasehub_updater/autoupdater_getx.dart';
// Register the service (typically in your main.dart or initServices)
Get.put(AutoUpdaterGetxService(
config: AutoUpdaterConfig(
baseUrl: 'https://your-server.com',
appId: 'com.example.app',
environment: 'prod',
checkOnStartup: true,
),
), permanent: true);
// Manual check from a widget
final updater = Get.find<AutoUpdaterGetxService>();
await updater.checkForUpdate(silent: false);
// Use reactive state in your UI
Obx(() => updater.isDownloading.value
? CircularProgressIndicator()
: YourWidget()
)
Custom UI
You can customize all dialogs and snackbars by providing AutoUpdaterUICallbacks:
Get.put(AutoUpdaterGetxService(
config: myConfig,
uiCallbacks: AutoUpdaterUICallbacks(
onShowUpdateAvailable: (info, onDownload) {
// Show your custom dialog
showMyCustomDialog(info, onDownload);
},
onShowError: (title, message) {
// Show your custom error UI
showMyErrorSnackbar(title, message);
},
),
));
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.
- AutoUpdaterGetxService
- GetX-based auto-updater service.
- 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.
- AutoUpdaterUICallbacks
- Callbacks for customizing the UI of the auto-updater.
- 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.