syncache_flutter 0.6.0
syncache_flutter: ^0.6.0 copied to clipboard
Flutter integration for Syncache - lifecycle management, widgets, and connectivity detection.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.6.0 #
Added #
PaginatedCacheBuilder<T>: a thin widget over core'sPaginatedCache<T>— subscribes to the windowed state, rebuilds on changes, and hands the builder the currentPagedViewState<T>plus aloadMorecallback. Deliberately scroll-agnostic: apps own their ScrollController / NotificationListener.
0.5.0 #
Added #
SyncacheInspectorScreen<T>: a ready-made debug page for a running cache — stats summary, the pending-mutation queue with per-item discard (and queue-wide retry now) actions, a cache-entry list (version, storedAt, stale badge), the rawSyncacheDebugJSON dump, and a clear-cache button. Ship it behind a debug flag; it is also demoed in the example app.
Changed #
- Bumped the
syncachedependency to^0.5.0(typed entries API,SyncacheDebug) in lockstep.
0.4.0 #
Added #
syncacheDebugLog: aLogFunctionthat routesLoggingObserveroutput through Flutter'sdebugPrint, so Flutter apps get framework-batched, throttling-safe log output instead of rawprint. Pair it with the newverbose: falseflag to suppress high-frequency events:LoggingObserver(log: syncacheDebugLog, verbose: false).
Changed #
- Dependency alignment with
syncache0.4.0 (constraint raised to^0.4.0).
0.3.0 #
Added #
SyncacheScopenow acceptsresolvePendingMutation(a record →Mutationresolver) andonRecovered. When provided, the scope replays persisted outbox records on mount viaSyncache.recoverPendingMutations, so offline writes queued before an app restart are re-enqueued — and flushed if the network is online — before normal usage. Top-level recovery failures are reported throughFlutterError.reportError.
Changed #
- Dependency alignment with
syncache0.3.0 (constraint raised to^0.3.0).
0.2.0 #
Changed #
- Dependency alignment with
syncache0.2.0 (constraint raised to^0.2.0). The core package's breaking changes apply to this package's widgets and lifecycle integration — in particular, invalidation no longer closes watch streams andmutate()returns aMutationHandle(see thesyncachechangelog).
Added #
FlutterNetworknow implements core'sReactiveNetwork. Passing it to aSyncachemakes the cache flush pending mutations automatically when connectivity is restored.SyncacheLifecycleObserveradditionally callsprocessPendingMutations()on reconnect as a belt-and-braces for caches whoseNetworkdoes not report connectivity changes. Watcher refetch on reconnect remains gated byLifecycleConfig.refetchOnReconnect.CacheBuilder/CacheConsumerdocumentation updated: the snapshot only reachesConnectionState.doneon dispose — invalidation refetches in place.
0.1.2 #
Changed #
- Version alignment with
syncache0.1.2 (dependency constraint raised to^0.1.2). No functional changes in this package.
0.1.0 - 2026-03-14 #
Added #
SyncacheScope- InheritedWidget for dependency injection of cache instancesMultiSyncacheScope- Helper for providing multiple cache types without deep nestingCacheBuilder- StreamBuilder-style widget for reactive cache data displayCacheConsumer- Consumer pattern widget with separate listener callbackSyncacheLifecycleObserver- App lifecycle and reconnect handling- Automatic refetch on app resume (configurable minimum pause duration)
- Automatic refetch on connectivity restoration
FlutterNetwork- Connectivity detection usingconnectivity_plus- Debounced connectivity change events
- Concurrent initialization handled via Completer pattern
SyncacheValueListenable- ValueListenable wrapper for use with ValueListenableBuilderLifecycleConfig- Configuration class for lifecycle behavior customization