flutter_offline_sync_manager library
Flutter Offline Sync Manager
A production-grade package for managing offline sync operations with crash-safety, restart-safety, and duplication-safety.
Classes
- AppLifecycleObserver
- Observer for app lifecycle events.
- BackgroundSyncConfig
- Configuration for background sync operations.
- BackgroundSyncController
- Abstract interface for platform-specific background sync controllers.
- BackgroundSyncManager
- Manages background sync registration and execution.
- BackgroundSyncService
- Service that bridges background sync execution with OfflineSyncManager.
- ClientWinsResolver
- Client wins resolver.
- ConflictDetectedResult
- Result of conflict detection.
- ConflictDetector
- Detects conflicts between local and server data.
- ConflictResolver
- Abstract interface for resolving conflicts between local and server data.
- ConnectivityService
- Abstract interface for monitoring network connectivity.
- DefaultConflictDetector
- Default implementation of ConflictDetector.
- DefaultConnectivityService
- Default implementation of ConnectivityService using connectivity_plus.
- DirtyField
- Represents a single dirty field that has been modified.
- DirtyPayloadBuilder
- Utility for building partial payloads containing only dirty fields.
- DirtyState
- Container that holds dirty fields for a specific entity.
- DirtyTracker
- Core engine for tracking dirty fields per entity.
- FieldLevelMergeResolver
- Field-level merge resolver.
- FirestoreSyncAdapter
- Firestore sync adapter implementation.
- FirestoreSyncConfig
- Configuration for Firestore sync adapter.
- GraphQLSyncAdapter
- GraphQL sync adapter implementation.
- GraphQLSyncConfig
- Configuration for GraphQL sync adapter.
- HiveSyncStore
- Hive-based implementation of SyncStore.
- LastWriteWinsResolver
- Last write wins resolver.
- OfflineSyncManager
- Core engine for managing offline sync operations.
- ResolutionResult
- Result of a conflict resolution operation.
- RestSyncAdapter
- REST API sync adapter implementation.
- RestSyncConfig
- Configuration for REST sync adapter.
- RetryPolicy
- Policy for determining retry delays using exponential backoff.
- ServerWinsResolver
- Server wins resolver.
- SyncAdapter
- Abstract interface for syncing tasks to a remote server.
- SyncConfig
- Configuration for the offline sync manager.
- SyncDebugController
- Controller for debug and observability features.
- SyncDebugSnapshot
- Immutable snapshot of the current sync engine state.
- SyncEvent
- Immutable event model representing a sync lifecycle event.
- SyncMetrics
- Aggregator for sync metrics and statistics.
- SyncResult
- Represents the result of a batch sync operation.
- SyncStore
- Abstract interface for persisting and managing sync tasks.
- SyncTask
- Represents a single sync task that needs to be synchronized with the server.
- SyncTaskAdapter
- Hive TypeAdapter for SyncTask.
Enums
- ConflictStrategy
- Strategy for resolving conflicts between local and server data.
- ResolutionSource
- Source of data used in conflict resolution.
- SyncEventType
- Types of sync events that can be emitted for debugging and observability.
- SyncOperation
- Represents the type of sync operation to be performed.
- SyncStatus
- Represents the current status of a sync task.
Typedefs
-
BackgroundSyncCallback
= Future<
bool> Function() - Callback function type for background sync execution.
Exceptions / Errors
- AdapterError
- Typed errors for adapter implementations.
- AuthError
- Authentication/authorization error.
- ConflictError
- Conflict error (version mismatch, optimistic locking failure, etc.).
- NetworkError
- Network-related error (timeout, connection failure, etc.).
- UnknownAdapterError
- Unknown or unexpected adapter error.
- ValidationError
- Validation error (bad request, invalid payload, etc.).