Open source · pub.dev · MIT License

The upgrader Flutter Package:
In-App Update Prompts Done Right

upgrader is a Flutter package that automatically detects when a newer version of your app is available on Google Play or the App Store, then shows a native-style dialog prompting users to update — with zero backend setup required.

13.7.0
Latest version
2,400+
Pub likes
247k
Weekly downloads
39
Languages
150
Pub points
// overview

What is the upgrader package?

The library — authored by Larry Aasen — compares the installed app version against the latest version in the Google Play Store or Apple App Store and presents an UpgradeAlert dialog or UpgradeCard widget when the store version is newer. No server, no version file, no configuration for mobile platforms.

Mobile: fully automatic

On Android and iOS, the library queries the store API directly, parses the version string, and compares it to the installed build reported by package_info_plus. No setup beyond adding the dependency.

Desktop & Web: Appcast XML

On macOS (direct distribution), Windows, Linux, and Web, the library reads an Appcast RSS 2.0 feed you host. The same format powers the Sparkle framework on macOS — one XML file controls the version prompt across all non-store platforms.

Mandatory upgrades

Set minAppVersion to a semver string. When the installed version falls below that floor, the IGNORE and LATER buttons disappear and the dialog becomes non-dismissible — users must update before continuing.

39 languages, RTL included

Every dialog string ships pre-translated. Arabic, Hebrew, Farsi, and Urdu render right-to-left without any extra configuration. Override any string via UpgraderMessages to match your app's tone.

// mechanics

How the package works under the hood

Each time the app starts (and again on resume, when checkOnResume is true), the library runs three steps before deciding whether to show the update prompt.

1

Fetch store version

On Android it scrapes the Google Play page; on iOS it calls the iTunes Search API. On desktop and web it downloads the Appcast XML feed from the URL you configured.

2

Compare versions

The library parses both versions as semantic version strings and compares them. If the store version is strictly greater, the update flow continues. If they are equal or the store version is lower, nothing happens.

3

Apply display rules

The library checks whether the user already tapped IGNORE for this version, or whether the durationUntilAlertAgain window has passed since they tapped LATER. Only if both gates clear does the dialog render.

// compatibility

Platform support matrix

PlatformVersion sourceDetectionExtra setup
AndroidGoogle Play Store✓ AutoNone
iOSApple App Store✓ AutoNone
macOSMac App Store✓ AutoNone (App Store build)
macOSDirect / notarized⚙ AppcastHost appcast.xml
WindowsCustom feed⚙ AppcastHost appcast.xml
LinuxCustom feed⚙ AppcastHost appcast.xml
WebCustom feed⚙ AppcastHost appcast.xml
// getting started

Quickstart: add the package in three steps

The fastest path to a working update prompt on Android and iOS takes under five minutes and requires no backend changes. The three steps below cover the entire integration: add the dependency, import the library, and wrap your home screen widget. Everything after that — store lookup, version parsing, dialog display, and re-prompt timing — is handled automatically.

Step 1 — Add the dependency

terminal
$ flutter pub add upgrader
# or manually in pubspec.yaml:
dependencies:
  upgrader: ^13.7.0

Step 2 — Import the library

import 'package:upgrader/upgrader.dart';

Step 3 — Wrap your home widget

main.dart
return MaterialApp(
  home: UpgradeAlert(
    child: MyHomePage(),
  ),
);
// UpgradeAlert must be below MaterialApp in the widget tree

That is all for Android and iOS. The library handles store lookup, version comparison, and re-prompt timing automatically.

// ui widgets

UpgradeAlert vs UpgradeCard

Choose the widget that fits your UX — or use both simultaneously with a shared Upgrader instance.

UpgradeAlert
Overlay dialog — renders on top of the current route.
Update Available
A newer version of the app is available. Version 2.1.0 is now available — you have 1.8.0. Would you like to update it now?
  • Material or Cupertino dialog style
  • IGNORE skips this version permanently
  • LATER re-prompts after durationUntilAlertAgain
  • UPDATE NOW opens the store listing
  • Mandatory mode: hides IGNORE and LATER
UpgradeCard
Inline Material card — embed anywhere in your layout.
New version available v2.1.0
Version 2.1.0 is now available in the App Store. Tap the button below to get the latest improvements and bug fixes.
UPDATE NOW
  • Zero height when app is up-to-date
  • Perfect for settings screens
  • Embed in Column, ListView, or Scaffold body
  • Shares state with UpgradeAlert via Upgrader instance
// configuration

Key configuration parameters

Pass these to the Upgrader() constructor. The instance can be shared between UpgradeAlert and UpgradeCard via the named upgrader: parameter, so both widgets stay in sync.

ParameterTypeDefaultDescription
durationUntilAlertAgainDuration3 daysSilence period after the user taps LATER before the dialog appears again.
minAppVersionString?nullSemver minimum. Below this version the upgrade is forced — IGNORE and LATER are hidden.
dialogStyleUpgradeDialogStylematerialSwitch to cupertino for an iOS ActionSheet-style prompt on all platforms.
checkOnResumebooltrueRe-runs the store version check each time the app returns from background.
barrierDismissibleboolfalseWhether tapping outside the dialog dismisses it without action.
debugLoggingboolfalsePrints store endpoint, raw version string, and comparison result to the debug console.
debugDisplayAlwaysboolfalseForces the dialog on every rebuild — use in debug mode only to inspect UI.
messagesUpgraderMessages?nullOverride title, body, button labels, or release-notes text for any language.
storeControllerUpgraderStoreController?nullPlug in UpgraderAppcastStore to enable desktop and web update detection.
shouldPopScopeBoolCallback?nullControls whether the system back gesture can close the upgrade dialog.
// localization

39 languages bundled — no extra files needed

All dialog strings are compiled into the package. RTL scripts (Arabic, Hebrew, Farsi, Urdu) render correctly without additional configuration. To add a new locale or customize any phrase, subclass UpgraderMessages and pass the instance to the constructor.

No additional Flutter localization setup is required — no arb files, no intl dependency, no locale delegate configuration. Each string (title, body, IGNORE, LATER, UPDATE NOW, and the release notes label) can be overridden individually, so you can match your app's tone in any of the 39 supported languages without forking the repository or patching source files.

Arabic (RTL)BasqueBengali Chinese (Simplified)Chinese (Traditional)Croatian CzechDanishDutch EnglishEstonianFarsi (RTL) FilipinoFinnishFrench GermanGreekHebrew (RTL) HindiHungarianIndonesian ItalianJapaneseKazakh KoreanLatvianLithuanian MalayNorwegianPolish PortugueseRomanianRussian SlovakSlovenianSpanish SwedishTurkishUrdu (RTL)
// faq

Frequently asked questions

This free, MIT-licensed Flutter library solves the problem of keeping app users on a current version. Without it, users running outdated builds may encounter bugs that are already fixed or miss security patches. The package checks the store on every app start and optionally on every resume, so the user hears about the new release as soon as possible — without the developer needing to build or maintain any server-side infrastructure.
The package supports Android, iOS, macOS, Windows, Linux, and Web — seven targets in total. Android and iOS use fully automatic store lookups. macOS (direct-distributed builds), Windows, Linux, and Web rely on an Appcast XML feed that you host and update whenever you ship a new release. The Mac App Store build can also use the automatic path.
Pass minAppVersion: '2.0.0' (or whichever version you require) to the Upgrader constructor. When the device's installed version is below that floor, the library hides the IGNORE and LATER buttons and sets barrierDismissible to false. The only available action is UPDATE NOW, which opens the store page. This is the right approach after a breaking API change or a critical security fix where older builds should not run at all.
Add debugDisplayAlways: true and debugLogging: true to the Upgrader constructor. The first parameter makes the dialog render on every hot reload regardless of the version comparison result. The second prints the full lookup trace — endpoint called, raw version string returned, parsed version, and comparison outcome — to the debug console. Remove both before building a production release.

Add it to your Flutter project today

Free, open source, MIT licensed. Add one dependency and let the library handle the rest.