supabase_flutter_ultra 0.1.0
supabase_flutter_ultra: ^0.1.0 copied to clipboard
Offline-first wrapper for Supabase Flutter with caching, offline write queue, delta sync, and conflict resolution — fully compatible with existing Supabase APIs.
Changelog #
All notable changes to supabase_flutter_ultra will be documented here.
This project adheres to Semantic Versioning.
0.1.0 — 2026-08-11 — Initial Release #
Added #
UltraClient— central facade wrappingSupabaseClientwith offline intelligenceSupabaseUltra.initialize()— single-call setup, mirrors Supabase.initialize API- Cache Layer
CacheManagerwith deterministic key buildingSqliteCacheAdapterfor persistent mobile/desktop cachingMemoryCacheAdapterfor web and testsLruEviction— Least-Recently-Used eviction trackerTtlEviction— periodic TTL sweep runner- Five cache strategies:
networkFirstWithFallback,cacheFirstThenNetwork,cacheIfFreshElseNetwork,cacheOnly,networkOnly - Named presets:
CachePolicy.aggressive,CachePolicy.conservative,CachePolicy.offlineOnly
- Queue Layer
OperationQueue— persistent FIFO queue for offline writesQueuePersistence— SQLite-backed queue storage surviving app restartsQueueProcessor— sequential operation replay with retry logicRetryStrategy—fixedDelay,exponentialBackoff,exponentialBackoffWithJitter,noRetry
- Sync Layer
SyncEngine— orchestrates queue drain + delta syncDeltaSync—updated_at > lastSyncAtdelta queries (no full-table downloads)SyncManifest— per-table checkpoint trackingSyncScheduler— configurable periodic background syncSyncStatestream — reactive status updates for UI
- Conflict Resolution Layer
ConflictResolver— dispatches to the correct strategy- Five strategies:
serverWins,clientWins,lastWriteWins,fieldLevelMerge,custom VectorClock— causal conflict detection for advanced use casesFieldLevelMergeStrategy— three-way merge with configurable field-conflict winner
- Network Layer
ConnectivityMonitor— combinesconnectivity_pluswith endpoint reachabilityNetworkStateenum:online,offline,reachabilityFailed,weakonReconnectstream — fires once on every offline→online transition
- Realtime Layer
UltraRealtime— offline-aware realtime wrapperEventBuffer— stores events during offline periods (configurable TTL + capacity)RealtimeReconciler— replays buffered events into cache on reconnect
- Query Layer
UltraQueryBuilder— offline-aware query builder mirroring Supabase APIUltraFilterBuilder— filter chain with offline-awarefetch()QueryInterceptor— pure read-strategy dispatcherUltraWriteResult— reports whether a write was executed or queued
- Models & Utils
SyncMetadata,LocalRecord,ConflictRecord— rich data modelsIdGenerator— UUID v4/v7 for offline-safe primary keysTimestampUtils,SerializationHelper— shared utility functions
- Tests
- Full unit test suite for cache, queue, and conflict layers
- Integration tests for offline scenarios without a live network
- Example App
- Complete offline-first Todo app with sync status screen
[Unreleased] #
Planned #
HiveCacheAdapter— alternative Hive-based cache backendUltraStorage— offline-first wrapper for Supabase StorageUltraRPC— offline-queued RPC (Edge Functions) supportConflictInspector— UI widget for manual conflict resolution- Drift ORM integration for richer local schema management
- Web platform support via IndexedDB adapter