showForceUpdateDialog function
Implementation
Future<void> showForceUpdateDialog(BuildContext context) async {
if (getBoolAsync(UPDATE_NOTIFY, defaultValue: true)) {
getAppCurrentVersion().then((value) {
String currentVersion = value;
if (isAndroid &&
(getStringAsync(ANDROID_LATEST_VERSION) != currentVersion)) {
showNewUpdateDialog(context,
canPop: currentVersion == getStringAsync(ANDROID_MINIMUM_VERSION));
} else if (isIOS &&
(getStringAsync(IOS_LATEST_VERSION) != currentVersion)) {
showNewUpdateDialog(context,
canPop: currentVersion == getStringAsync(IOS_MINIMUM_VERSION));
}
});
}
}