Add all_about_forced_update
as dependency to your pubspec.yaml
dependencies:
all_about_forced_update:
git:
url: ssh://[email protected]:2222/flutter/all-about-forced-update.git
- Check if the current version of the app is outdated and needs an update.
- Open the app store for the user to update
Provide an url to a .json file with the following contents:
{
"minVersionCodeAndroid": 0,
"minVersionCodeIos": 0,
"iosAppStoreId": "123456789",
"androidPackageName": "at.allaboutapps.app"
}
Check if an update is needed
if (await AllAboutForcedUpdate.instance.forcedUpdateNeeded(forcedUpdateConfigUrl)) {
// show update screen or dialog
}
Open the app store to update the app
AllAboutForcedUpdate.instance.openAppStore()