flutter_query
0.11.1, released 4 months ago by flutterquery.com
Asynchronous state management for server data with automatic caching and background updates.
WASM-ready
What it does
Fetches, caches, and synchronizes server data in Flutter applications, providing automatic request deduplication, background refetching, and stale-while-revalidate capabilities. It is inspired by TanStack Query and utilizes Flutter hooks.
AI-written summary of version 0.11.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want automatic caching and background refetching for remote server data
- You are already using flutter_hooks in your application
Skip it when
- You are not using flutter_hooks and prefer traditional state management architectures
- You are dealing with simple local state that does not involve network requests
Strengths
- Automatic caching and stale time configuration
- Request deduplication for shared network requests
- Built-in support for infinite pagination and optimistic updates
Weaknesses
- Requires flutter_hooks for its core API widgets/functions
- Relatively new package with evolving APIs before v1.0.0
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Requires Flutter >=3.32.0 and Dart >=3.0.0 <4.0.0.
useQuery(['user'], fetchUser, seed: Seed.value(cachedUser));Alternatives
Packages that do the same job and could replace flutter_query.
Works with
Packages commonly used together with flutter_query: ones it builds on, ones built on it, and its own family.