Search packages, repositories and app categories

Package detailsv3.7.1

cached_query

A simple library for dealing with server state in dart and flutter.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
18.7K
Likes
103
Pub points
160

Install package

flutter pub add cached_query

Package Overview

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

CachedQuery is a lightweight Dart and Flutter library designed to simplify server state management by providing an intuitive way to cache, retrieve, and refresh data from remote sources. It helps developers handle asynchronous data fetching with built-in caching mechanisms, reducing redundant network calls and improving app performance. The package supports various platforms including Android, iOS, Web, macOS, Windows, and Linux, making it versatile for cross-platform applications. It integrates seamlessly into Flutter projects using a straightforward API.

Use cases

  • Caching API responses
  • Reducing redundant network requests
  • Managing server state in Flutter apps
  • Implementing offline-first data strategies
  • Synchronizing data across app restarts
  • Improving UI responsiveness with cached data

Key features

  • Built-in caching layer
  • Automatic cache invalidation
  • Support for async data retrieval
  • Cross-platform compatibility
  • Simple API integration
  • Configurable cache expiration

Suitable for

  • Flutter developers managing server state
  • Apps requiring efficient data caching
  • Projects aiming for offline functionality
  • Developers seeking minimal boilerplate for data fetching
  • Teams prioritizing performance and user experience

Considerations

  • Requires understanding of async/await patterns
  • Cache size and eviction policies may need customization
  • Not suitable for large-scale real-time data synchronization
  • Limited to basic caching needs without advanced features like conflict resolution

Original README

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

Cached Query

Visit the documentation for more information.

A small collection of dart and flutter libraries inspired by tools such as SWR, RTKQuery, React Query, Urql and apollo from the React world.

Cache any the response of any asynchronous function (usually external api requests) for a fast and snappy user experience.

The repo is made of three packages:

  • The base package, Cached Query, has no flutter dependencies and can therefore be used in any dart project.
  • Cached Query Flutter adds some useful flutter tools such as connectivity re-fetching and focus re-fetching.
  • Cached Storage is a persistent storage addon for flutter apps.

Categories

Dependencies

Dependency list 2 items

Source repository

Projects using this package

No data available yet.