Connectivity Listener Service
Component Detail
Service Layer
low complexity
Shared Component
mobile
0
Dependencies
2
Dependents
0
Entities
0
Integrations
Description
Monitors device network connectivity using the connectivity_plus Flutter package and emits state change events consumed by other offline services. Triggers background sync initiation when connectivity is restored and suppresses outbound API calls while offline.
connectivity-listener-service
Responsibilities
- Subscribe to platform connectivity events via connectivity_plus
- Debounce rapid connectivity state changes to prevent sync thrashing
- Notify OfflineStorageService and BackgroundSyncService of connectivity transitions
- Expose a stream for UI components to reflect current connectivity state
Interfaces
connectivityStream: Stream<ConnectivityState>
isOnline(): bool
onConnectivityRestored(VoidCallback callback): void
Relationships
Dependents (2)
Components that depend on this component