force_update_helper
0.4.0, released 11 days ago by codewithandrea.com
Shows a remotely controlled force update prompt for iOS and Android apps.
What it does
Fetches a required app version from a remote source (like Firebase Remote Config or a custom backend) and compares it with the current app version. If the required version is greater, it prompts the user to update and navigates them to the store listing.
AI-written summary of version 0.4.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to force users to update their app versions using a remote configuration.
- You want a UI-agnostic package that only tells you when to show the update prompt.
Skip it when
- You need web or desktop platform support for force updates.
- You want a solution that automatically queries app store APIs directly instead of a remote server.
Strengths
- Remote-controlled logic independent of store API quirks.
- UI-agnostic, allowing full customization of the update alert dialog.
- Small and simple codebase.
Weaknesses
- Only supports iOS and Android.
- Requires managing a remote endpoint or remote config source for the required version.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add ForceUpdateWidget to MaterialApp's builder property and supply an iOS App Store ID if deploying to iOS.
ForceUpdateWidget(
navigatorKey: _rootNavigatorKey,
forceUpdateClient: ForceUpdateClient(
fetchRequiredVersion: () => Future.value('2.0.0'),
iosAppStoreId: '6482293361',
),
allowCancel: false,
showForceUpdateAlert: (context, allowCancel) => showAlertDialog(
context: context,
title: 'App Update Required',
content: 'Please update to continue using the app.',
defaultActionText: 'Update Now',
),
showStoreListing: (storeUrl) async {
if (await canLaunchUrl(storeUrl)) {
await launchUrl(storeUrl, mode: LaunchMode.externalApplication);
}
},
child: child!,
)Alternatives
Packages that do the same job and could replace force_update_helper.
- in_app_update
Triggers official Google Play In-App Updates on Android devices.
81Compare - flutter_rustore_update
Flutter RuStore Update SDK.
75Compare - check_app_version
Check app version against app stores or remote JSON and display update dialogs.
74Compare - flutter_app_update
A simple lightweight and customizable version update library for Flutter
61Compare
Works with
Packages commonly used together with force_update_helper: ones it builds on, ones built on it, and its own family.