Skip to content
pubscout

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
$ flutter pub add flutter_query
Source repository

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.

  • riverpod

    If you prefer a robust, global provider-based dependency injection and state management solution without relying strictly on flutter_hooks.

  • bloc

    If you want a strict event-driven state management pattern with predictable state transitions.

Works with

Packages commonly used together with flutter_query: ones it builds on, ones built on it, and its own family.