flutter_swr 0.2.0
flutter_swr: ^0.2.0 copied to clipboard
A Flutter Hooks port of SWR: cache-then-revalidate data fetching with dedup, retry, polling, and app-resume revalidation.
0.2.0 - 2026-09-21 #
- Added
skipError,skipLoadingOnReload, andskipLoadingOnRefreshparameters toSwrResponse.when/maybeWhen/map/maybeMap, mirroring Riverpod'sAsyncValue.when.skipError(defaultfalse) routes a failed background revalidation to thedatabranch instead oferrorwhen stale data is still available, so a transient fetch failure doesn't hide already-cached data. - Fixed a "key has no fetcher" error thrown by app-resume revalidation when a controller for a key exists (e.g. from a persisted cache) before its fetcher is attached on first mount.
0.1.0 - 2026-09-17 #
Initial release.
useSwrhook: stale-while-revalidate data fetching with request deduplication and automatic revalidation.SwrProviderfor scoping a cache to a subtree, with a shared global cache by default.mutatefor optimistic/manual cache updates, including a top-levelmutatethat reaches every registeredSwrCache(not just the default).- Conditional fetching (skip the fetch by passing a
nullkey). revalidateOnFocussupport viaSwrConfig.