syncStatusProvider top-level property

NotifierProvider<SyncStatusNotifier, AsyncValue<SyncStatus>> syncStatusProvider
final

The live, lifecycle-gated sync status (spec §3.3; flutter-patterns § Stream Lifecycle; the contract in core/lifecycle/app_lifecycle_provider).

Two ORTHOGONAL recovery mechanisms, exactly as the contract demands:

  1. Lifecycle gate — cancel the Rust-side stream on paused (battery), re-snapshot + re-subscribe ONLY on a real paused → resumed (tracked locally; inactive/hidden → resumed is window-focus / shade noise, not a real resume). Never pause on hidden (desktop's deepest state; Android's pre-paused step) — desktop keeps the stream live while hidden, which is wanted.
  2. Reconnect-on-fault — a stream error or completion (transport drop, EOF, timeout — the unstable-network normal) re-subscribes with capped exponential backoff, INDEPENDENT of lifecycle. On desktop paused never fires, so this is the ONLY recovery path there.

Implementation

final syncStatusProvider =
    NotifierProvider<SyncStatusNotifier, AsyncValue<SyncStatus>>(
      SyncStatusNotifier.new,
    );