Upgrader — In-App Update Prompts
for Flutter Apps
The upgrader package adds automatic update dialogs to your Flutter app. It checks App Store and Google Play for a newer version and notifies users the moment one is available — with zero backend required.
What the Upgrader Package Does
upgrader is a Flutter package that watches your app's version against the version published on the App Store or Google Play. When a newer release is found, it surfaces an update dialog — either a full-screen alert or an inline card — without any server-side code on your end.
The package handles the store lookup, version comparison, localisation, and dismissal logic. You control how often the prompt reappears, whether it can be dismissed, and what the dialog text says. The minimal integration is a single widget wrap around your home screen.
Fetch store version
upgrader queries the App Store or Google Play and reads the latest published version of your app.
Compare versions
It compares the store version against the version from your app's pubspec.yaml or package info.
Show dialog
If a newer version is found, it shows an UpgradeAlert dialog or UpgradeCard widget.
User updates
Tapping the update button opens the store listing directly. The user installs the update and returns.
How to Install the Upgrader Package
Add upgrader to your Flutter project with the standard pub command:
flutter pub add upgrader
This adds upgrader to your pubspec.yaml and fetches the package.
No native configuration is needed for iOS or Android — the package reads
the app's bundle identifier and queries the relevant store automatically.
Android — minimum SDK
upgrader uses the Google Play In-App Update API for deep-link behaviour.
Set minSdkVersion to at least 21 in your
android/app/build.gradle:
// android/app/build.gradle
android {
defaultConfig {
minSdkVersion 21
}
}
iOS — no extra steps
No Info.plist changes are required. upgrader looks up your app on the
App Store by bundle ID (CFBundleIdentifier) which is already set in your project.
Using the Upgrader Widget in Your App
The most common way to use upgrader is to wrap your home widget with UpgradeAlert.
It intercepts navigation once the store check completes, showing the dialog only when
an update is available.
Minimal setup — UpgradeAlert
import 'package:upgrader/upgrader.dart';
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: UpgradeAlert(
child: MyHomePage(),
),
);
}
}
That is the complete minimal integration. upgrader handles the rest: store lookup, version comparison, dialog display, and repeat-interval logic.
Inline card — UpgradeCard
If you prefer a banner inside your own UI instead of a blocking dialog,
use UpgradeCard. It renders as a Flutter widget you can place anywhere:
Scaffold(
body: Column(
children: [
UpgradeCard(), // shows only when update is available
Expanded(child: MyContent()),
],
),
)
debugLogging: true
to the Upgrader() constructor to see version-check results in the console
without waiting for a real store update.
How Upgrader Determines the Latest Version
On iOS and macOS, upgrader calls the iTunes Lookup API with your app's bundle ID
and reads the version field from the JSON response. On Android it queries
the Google Play store page and parses the current version from the HTML.
Both checks are performed over HTTPS; no API key is required.
The local version is read from PackageInfo.fromPlatform(), which returns
the value of version from your pubspec.yaml.
Version comparison uses semantic versioning: 1.0.0 < 1.0.1 < 1.1.0 < 2.0.0.
Custom version source
For enterprise apps not published on a public store, implement UpgraderStore
and return the latest version from your own endpoint:
class MyStore implements UpgraderStore {
@override
Future<UpgraderVersionInfo> getVersionInfo({
required UpgraderState state,
required Version installedVersion,
required String? country,
required String? language,
}) async {
final latest = await fetchLatestVersionFromServer();
return UpgraderVersionInfo(
appStoreVersion: Version.parse(latest),
appStoreListingURL: 'https://example.com/download',
);
}
}
Then pass it to the constructor:
UpgradeAlert(
upgrader: Upgrader(
storeController: UpgraderStoreController(
onAndroid: () => MyStore(),
oniOS: () => MyStore(),
),
),
child: MyHomePage(),
)
Key Upgrader Configuration Options
Pass an Upgrader() instance to UpgradeAlert to customise behaviour.
The most commonly adjusted options are listed below:
| Parameter | Type | What it controls |
|---|---|---|
daysUntilAlertAgain |
int | Days before the dialog re-appears after the user dismisses it. Default: 3. Set to 0 to show every launch. |
minAppVersion |
String | Minimum version you want to enforce. Users below this version see a non-dismissible dialog regardless of canDismissDialog. |
canDismissDialog |
bool | Whether the user can close the dialog without updating. Set to false to block the app until the update is installed. |
countryCode |
String? | ISO country code for the App Store lookup. Default: device locale. Useful when your app is only published in specific regions. |
languageCode |
String? | Overrides the dialog language. upgrader ships with built-in localisations for 30+ languages. |
debugLogging |
bool | Prints version-check details to the debug console. Useful during development; disable in production. |
willDisplayUpgrade |
Callback? | Called before the dialog is shown. Return false to suppress the dialog conditionally (e.g., during onboarding). |
Force-update example
To block users from continuing without updating — for example after a breaking API change — set
canDismissDialog: false and daysUntilAlertAgain: 0:
UpgradeAlert(
upgrader: Upgrader(
minAppVersion: '2.0.0',
daysUntilAlertAgain: 0,
canDismissDialog: false,
),
child: MyHomePage(),
)
Users on versions below 2.0.0 see the dialog immediately and cannot close it.
Users already on 2.0.0 or higher are unaffected.
Platforms the Upgrader Package Supports
upgrader works across all Flutter target platforms. Store-based version lookup is available where a public store listing exists; other platforms use a custom version source.
iOS
App Store lookup via iTunes API. Automatic bundle ID detection.
Android
Google Play lookup. Supports In-App Update API for deep-link flow.
macOS
App Store lookup. Works the same as iOS using the Mac bundle ID.
Windows
Use a custom UpgraderStore pointing to your update server or MSIX feed.
Linux
Supported with a custom version source. Useful for distributing via Snap or AppImage.
Web
Supported. Provide a custom version endpoint; there is no app-store lookup for web.
Frequently Asked Questions about the Upgrader Package
What is the upgrader Flutter package?
upgrader is a Flutter package that automatically checks whether a newer version of your app is available on the App Store or Google Play, and shows an update dialog to the user when one is found. It requires no backend and works with a single widget wrap.
How do I install the upgrader package?
flutter pub add upgrader
Then wrap your home widget:
home: UpgradeAlert(child: MyHomePage())
Which platforms does upgrader support?
iOS, Android, macOS, Windows, Linux and Web. Store-based version lookup works
automatically for iOS, Android and macOS. Windows, Linux and Web require a
custom UpgraderStore that returns the version from your own endpoint.
Can I force the user to update and block the app?
Yes. Set daysUntilAlertAgain: 0 and canDismissDialog: false
on the Upgrader() instance. You can also set minAppVersion
to trigger this behaviour only for users below a specific version.
Can I use upgrader without the App Store or Google Play?
Yes. Implement the UpgraderStore interface and return the latest version
from your own server endpoint, then pass it via storeController in
the Upgrader() constructor. This works on all platforms.
How do I test the upgrader dialog without publishing a new version?
Pass debugLogging: true to see version-check output in the console.
To force the dialog to appear, temporarily set minAppVersion to a version
higher than your current installed version — the dialog will show as if an update exists.
Does upgrader support multiple languages?
Yes. upgrader ships with built-in translations for 30+ languages. It automatically picks
the device locale. You can override the language with the languageCode
parameter, or supply fully custom message strings via UpgraderMessages.