flutter_query_client 1.0.0 copy "flutter_query_client: ^1.0.0" to clipboard
flutter_query_client: ^1.0.0 copied to clipboard

A TanStack Query-inspired server state management library for Flutter. Handles caching, background refetching, pagination, mutations, and network-aware fetching out of the box.

1.0.0 #

Initial stable release.

Features #

  • QueryController — fetch and cache server data with automatic stale-while-revalidate, retry with exponential backoff, refetch on mount, and refetch on reconnect
  • MutationController — user-triggered mutations with lifecycle hooks (onSuccess, onMutationError, onSettled) and optimistic cache update support
  • InfiniteQueryController — paginated / infinite-scroll queries with loadMore(), hasMore, cursor or page-number pagination, and item-level cache helpers (updateItem, removeItem, appendItem, prependItem)
  • QueryClient — singleton two-level cache (baseKey + serialized params) with stale-time tracking, garbage collection, and active observer registry
  • QueryClientProviderInheritedWidget for injecting QueryClient and global QueryDefaults into the widget tree
  • QueryProvider / InfiniteQueryProviderStatefulWidget wrappers with remount detection via TickerMode for IndexedStack and Visibility support
  • QueryBuilder / InfiniteQueryBuilder — reactive builders that rebuild on state changes
  • QueryListener / MultiQueryListener — side-effect widgets that respond to success and error without rebuilding the tree
  • QueryState — Freezed-based immutable state with status, fetchStatus, isStale, and convenience getters
  • NetworkConnectivityObserver — true L7 connectivity verification (HTTP HEAD), debounced events (500ms), lazy initialization
  • QueryDefaults — global configuration for stale time, gc time, retry count, retry delay, refetch interval, network mode, error transform, and logging
  • QueryLogger — opt-in structured logging with customizable handlers
2
likes
0
points
228
downloads

Publisher

unverified uploader

Weekly Downloads

A TanStack Query-inspired server state management library for Flutter. Handles caching, background refetching, pagination, mutations, and network-aware fetching out of the box.

Repository (GitHub)
View/report issues

Topics

#state-management #caching #fquery #flutter-query #tanstack-query

License

unknown (license)

Dependencies

bloc, connectivity_plus, flutter, flutter_bloc, freezed_annotation, internet_connection_checker_plus, logging, meta

More

Packages that depend on flutter_query_client