isUpdateAvailable method
Implementation
bool isUpdateAvailable() {
if (debugLogging) {
print('upgrader: appStoreVersion: $_appStoreVersion');
print('upgrader: installedVersion: $_installedVersion');
print('upgrader: minAppVersion: $minAppVersion');
}
if (_appStoreVersion == null || _installedVersion == null) {
if (debugLogging) {
print('upgrader: isUpdateAvailable: false');
}
return false;
}
if (_updateAvailable == null) {
final appStoreVersion = Version.parse(_appStoreVersion!);
final installedVersion = Version.parse(_installedVersion!);
final available = appStoreVersion > installedVersion;
_updateAvailable = available ? _appStoreVersion : null;
}
if (debugLogging) {
print('upgrader: isUpdateAvailable: ${_updateAvailable != null}');
}
return _updateAvailable != null;
}