shouldDisplayUpgrade method
bool
shouldDisplayUpgrade(
)
Implementation
bool shouldDisplayUpgrade() {
final isBlocked = blocked();
if (debugLogging) {
print('upgrader: blocked: $isBlocked');
print('upgrader: debugDisplayAlways: $debugDisplayAlways');
print('upgrader: debugDisplayOnce: $debugDisplayOnce');
print('upgrader: hasAlerted: $_hasAlerted');
}
// If installed version is below minimum app version, or is a critical update,
// disable ignore and later buttons.
if (isBlocked) {
showIgnore = false;
showLater = false;
}
if (debugDisplayAlways || (debugDisplayOnce && !_hasAlerted)) {
return true;
}
if (!isUpdateAvailable()) {
return false;
}
if (isBlocked) {
return true;
}
if (isTooSoon() || alreadyIgnoredThisVersion()) {
return false;
}
return true;
}