Files
rmtPocketWatcher/flutter_app/UPDATE_SYSTEM.md
HRiggs 9ff0d62651
Some checks failed
Flutter Release / get-version (push) Successful in 8s
Flutter Release / build-windows (push) Failing after 9s
Flutter Release / build-android (push) Failing after 1m12s
Flutter Release / create-release (push) Has been skipped
check update
2025-12-14 23:11:50 -05:00

2.3 KiB

Update System

The rmtPocketWatcher Flutter app includes an automatic update checking system that monitors the Gitea repository for new releases.

How It Works

  1. Automatic Checks: The app checks for updates every 4 hours automatically
  2. Manual Checks: Users can manually check for updates using the refresh button in the title bar
  3. Version Comparison: Compares current app version (from pubspec.yaml) with latest release tag
  4. Platform Detection: Automatically detects the appropriate download asset for the current platform

Components

UpdateService

  • Fetches releases from Gitea RSS feed: https://git.hudsonriggs.systems/LambdaBankingConglomerate/rmtPocketWatcher/releases.rss
  • Parses XML/RSS format to extract release information
  • Compares version numbers and generates platform-specific download URLs

UpdateProvider

  • Manages update checking state and notifications
  • Stores last check time and dismissed updates in SharedPreferences
  • Provides reactive state for UI components

UpdateNotificationBanner

  • Shows a dismissible banner when updates are available
  • Displays version information and release details
  • Provides direct links to download or view release page

Configuration

The system is configured to work with your Gitea repository structure:

  • Repository: LambdaBankingConglomerate/rmtPocketWatcher
  • RSS Feed: https://git.hudsonriggs.systems/LambdaBankingConglomerate/rmtPocketWatcher/releases.rss
  • Release tags should follow semantic versioning (e.g., v1.0.0, v1.2.3)
  • Expected asset naming convention:
    • Windows: rmtPocketWatcher-windows-x64.exe, rmtPocketWatcher-windows-x64.msi
    • macOS: rmtPocketWatcher-macos.dmg
    • Linux: rmtPocketWatcher-linux.appimage
    • Android: rmtPocketWatcher-android.apk

Usage

The update system is automatically initialized when the app starts:

// In HomeScreen initState
context.read<UpdateProvider>().initialize();
context.read<UpdateProvider>().startPeriodicChecks();

Users will see:

  1. A notification banner when updates are available
  2. An update icon in the title bar (desktop)
  3. A detailed dialog with release notes and download options

Privacy & Security

  • Only checks public release information
  • No personal data is transmitted
  • Downloads are handled by the system browser/app store
  • Users control when to update (no forced updates)