tanquery_flutter 0.8.0
tanquery_flutter: ^0.8.0 copied to clipboard
Flutter adapter for tanquery. Widget builders for automatic caching, stale-while-revalidate, and background refetching. QueryBuilder, MutationBuilder, InfiniteQueryBuilder.
0.8.0 #
Type Safety #
- Added
finalclass modifier toQueryConfig(data class, not meant to be extended). - Added
abstract finalclass modifier toDartQuery(utility class with static method only, not meant to be instantiated or extended). - Updated dependency to
tanquery: ^0.8.0.
0.7.1 #
Documentation #
- Added dartdoc comments to all public APIs: widgets, typedefs, widget properties, and constructors. Includes usage examples for QueryBuilder, MutationBuilder, InfiniteQueryBuilder, and QueriesBuilder.
0.7.0 #
Bug Fixes #
- InfiniteQueryBuilder
catchErrortype mismatch fixed -- Replaced.catchError((_) {})with.then((_) {}, onError: (_) {})to prevent Future type mismatch errors on page fetch failures.
0.6.0 #
Bug Fixes #
- InfiniteQueryBuilder:
_isFetchingPagereset on widget reconfiguration -- Previously stuck attrueafter config change (e.g., queryKey change), permanently blockingfetchNextPage/fetchPreviousPage.
0.5.0 #
Improvements #
- No functional changes. Version bump for dependency compatibility with tanquery 0.5.0.
0.4.0 #
Bug Fixes #
- InfiniteQueryBuilder: observer now properly destroyed on dispose -- Previously leaked timers and observer registrations, potentially causing
setStateon disposed widgets. - InfiniteQueryBuilder: race condition guard -- Added
_isFetchingPageflag to prevent concurrentfetchNextPage/fetchPreviousPagecalls from corrupting page data. - InfiniteQueryBuilder: error handling on page fetch --
fetchNextPage/fetchPreviousPagenow catch and swallow errors instead of leaving unhandled futures. - InfiniteQueryBuilder: mounted check -- Both fetch methods now check
mountedbefore accessingcontextor callingsetState.
Improvements #
- InfiniteQueryBuilder:
maxPagesnow enforced -- Previously accepted but ignored. Now trims pages from the opposite end when limit is exceeded. - InfiniteQueryBuilder:
didUpdateWidgetdetects all config changes -- Now detects changes toqueryFn,initialPageParam,getNextPageParam,getPreviousPageParam,gcTime,maxPagesin addition toqueryKey,staleTime,enabled,retryCount. - QueryBuilder:
didUpdateWidgetdetects all config changes -- Now detects changes toqueryFn,select,placeholderData,placeholderDataFn,retryCount,networkMode,gcTimein addition to the original 4 properties. - QueriesBuilder:
_queriesChangeddetectsstaleTimeandenabledchanges -- Previously only checked query keys.
0.3.0 #
Improvements #
- Renamed packages from
dart_query_fluttertotanquery_flutterfor pub.dev compatibility
0.2.0 #
Improvements #
- Updated repository URL to https://github.com/OttomanDeveloper/tanquery
- Comprehensive beginner-friendly README with before/after examples
- Common patterns section: conditional fetching, polling, pull-to-refresh
0.1.0 #
Initial Release #
- DartQueryProvider with InheritedWidget + lifecycle wiring
- Automatic
QueryClient.mount()/unmount()lifecycle management - App focus detection via
WidgetsBindingObserverwired toFocusManager DartQuery.of(context)for client access with descriptive error message- QueryBuilder widget with full query option support
- MutationBuilder widget with
mutate(fire-and-forget) andmutateAsync(awaitable) - InfiniteQueryBuilder widget with
fetchNextPage/fetchPreviousPage - QueriesBuilder for parallel query coordination
- All widgets use
didChangeDependencies(notinitState) for proper InheritedWidget access - Null-safe observer guards in
build()methods - Barrel export re-exports
tanquerycore (hidesFocusManagerto avoid Flutter collision) - 5 widget tests