InfiniteQuery<T, PageParam> class
Manages the state and lifecycle of an infinite (paginated) data query.
Constructors
-
InfiniteQuery({required List<
Object> queryKey, required InfiniteQueryFetcher<T, PageParam> fetcher, required QueryCache cache, required NetworkPolicy networkPolicy, GetNextPageParam<T, PageParam> ? getNextPageParam, GetPreviousPageParam<T, PageParam> ? getPreviousPageParam, QueryConfig config = const QueryConfig(), PageParam? initialPageParam, void onSuccess()?, void onError(String error)?, void onRefreshError(String error)?})
Properties
- config → QueryConfig
-
final
-
fetcher
→ InfiniteQueryFetcher<
T, PageParam> -
final
-
getNextPageParam
→ GetNextPageParam<
T, PageParam> ? -
final
-
getPreviousPageParam
→ GetNextPageParam<
T, PageParam> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialPageParam → PageParam?
-
final
-
queryKey
→ List<
Object> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
state
→ InfiniteQueryState<
T> -
no setter
-
stateStream
→ Stream<
InfiniteQueryState< T> > -
no setter
Methods
-
dispose(
) → void -
fetch(
{bool force = false, PageParam? initialPageParam}) → Future< void> -
fetchNextPage(
) → Future< void> -
fetchPreviousPage(
) → Future< void> -
invalidate(
{bool removeCache = false}) → Future< void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refetch(
) → Future< void> -
refresh(
) → Future< void> - Refreshes the query by clearing all cached data and refetching from the first page This is ideal for pull-to-refresh functionality
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited