checkForUpdatesSilent static method
Check for updates silently (no UI feedback if no update).
Only shows UI if an update is available.
Implementation
static Future<void> checkForUpdatesSilent() async {
if (_instance == null) {
debugPrint('[AutoUpdater] Not initialized. Call init() first.');
return;
}
// For silent checks, we wait for navigator to be ready
// This handles the case where startup check runs before app is fully initialized
if (_navigatorKey.currentState == null) {
debugPrint('[AutoUpdater] Navigator not ready yet, will retry in 1 second...');
await Future.delayed(const Duration(seconds: 1));
if (_navigatorKey.currentState == null) {
debugPrint('[AutoUpdater] Navigator still not ready. Skipping silent check.');
return;
}
}
await _instance!.checkForUpdate(silent: true);
}