Search packages, repositories and app categories

Package detailsv0.11.1

flutter_query

Fetch, cache, and sync server data with automatic state management and background updates, inspired by TanStack Query.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
383
Likes
39
Pub points
160

Install package

flutter pub add flutter_query

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Flutter Query is a state management package for fetching, caching, and synchronizing server data with automatic handling of loading, error, and success states. Inspired by TanStack Query, it simplifies data fetching in Flutter apps by providing declarative APIs, background updates, and built-in cache invalidation. It supports all major platforms and integrates seamlessly with Flutter’s reactive ecosystem. The package reduces boilerplate and enhances performance through intelligent caching strategies and automatic refetching.

Use cases

  • Real-time data synchronization
  • Offline-first app development
  • API data caching
  • Dynamic UIs with server data
  • Automated background refreshes

Key features

  • Automatic state management
  • Built-in caching and stale-while-revalidate
  • Background data sync
  • Declarative API design
  • Error boundary integration
  • Refetch on window focus

Suitable for

  • Developers building data-heavy Flutter apps
  • Teams seeking reduced boilerplate
  • Apps requiring offline support
  • Projects using REST or GraphQL APIs
  • Apps needing real-time data updates

Considerations

  • Learning curve for new users
  • Potential memory usage with large caches
  • Requires understanding of reactive programming
  • Limited customization in some edge cases
  • May need additional setup for complex authentication flows

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

flutter_query logo

Flutter Query

CI Status MIT License GitHub Stars

Pub Version Pub Points Pub Likes

A Flutter package inspired by TanStack Query for powerful asynchronous state management. Built with Flutter Hooks.

Coming from TanStack Query? Check out the differences to get started quickly.

Why Flutter Query?

Working with server data is hard. You need caching, deduplication, background refetching, stale data handling, and more. Flutter Query handles all of this out of the box:

  • Automatic caching with intelligent invalidation
  • Request deduplication so multiple widgets share a single network request
  • Background updates to keep data fresh
  • Stale-while-revalidate patterns for instant UI with fresh data
  • Optimistic updates for responsive mutations
  • Retry logic with exponential backoff

Documentation

Visit flutterquery.com for the full documentation, tutorials, and guides.

Platform Support

Android iOS macOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅

Requirements

  • Flutter >=3.32.0
  • Dart >=3.0.0 <4.0.0

Versioning

This project strictly follows Semantic Versioning. Given a version number MAJOR.MINOR.PATCH:

  • MAJOR version increments indicate breaking changes
  • MINOR version increments add functionality in a backward-compatible manner
  • PATCH version increments include backward-compatible bug fixes

Before version 1.0.0, MINOR version increments may include breaking changes.

Support

If you find Flutter Query useful, consider giving it a ⭐ to help others discover it!

Categories

Dependencies

Dependency list 4 items

Source repository

Projects using this package

No data available yet.