Add background sync runner and rejected-sync UX

This commit is contained in:
Rijad Zuzo
2026-02-15 20:13:12 +01:00
parent add0105e6b
commit 497805ed3b
8 changed files with 361 additions and 2 deletions
+10
View File
@@ -26,6 +26,16 @@ class AppConfig {
static bool get useHiveLocalDb =>
const bool.fromEnvironment('USE_HIVE_LOCAL_DB', defaultValue: true);
/// Enables periodic startup/resume sync triggers while authenticated.
static bool get enableBackgroundSync =>
const bool.fromEnvironment('ENABLE_BACKGROUND_SYNC', defaultValue: true);
/// Interval used for periodic background sync ticks.
static int get backgroundSyncIntervalSeconds => const int.fromEnvironment(
'BACKGROUND_SYNC_INTERVAL_SECONDS',
defaultValue: 180,
);
/// Runtime override for backend URL (e.g. local settings screen).
static void overrideBackendBaseUrl(String? baseUrl) {
_baseUrlOverride = baseUrl;