InfiniteQueryResult<TPage> class
Result exposed to the builder of InfiniteQueryBuilder.
Constructors
-
InfiniteQueryResult({required List<
TPage> pages, required QueryStatus status, Object? error, StackTrace? errorStackTrace, required bool hasNextPage, required bool hasPreviousPage, required bool isFetchingNextPage, required bool isFetchingPreviousPage, required Future<void> fetchNextPage(), required Future<void> fetchPreviousPage(), required VoidCallback refetch, DateTime? dataUpdatedAt}) -
Creates an infinite query result.
const
Properties
- dataUpdatedAt → DateTime?
-
When data was last successfully fetched.
final
- error → Object?
-
The last error, if any.
final
- errorStackTrace → StackTrace?
-
Stack trace of the last error.
final
-
fetchNextPage
→ Future<
void> Function() -
Fetches the next page. No-op if hasNextPage is
falseor isFetchingNextPage istrue.final -
fetchPreviousPage
→ Future<
void> Function() -
Fetches the previous page. No-op if hasPreviousPage is
falseor isFetchingPreviousPage istrue.final - hashCode → int
-
The hash code for this object.
no setterinherited
- hasNextPage → bool
-
Whether more pages are available after the last loaded page.
final
- hasPreviousPage → bool
-
Whether more pages are available before the first loaded page.
final
- isError → bool
-
Whether an error occurred.
no setter
- isFetchingNextPage → bool
-
Whether the next page is currently being fetched.
final
- isFetchingPreviousPage → bool
-
Whether the previous page is currently being fetched.
final
- isLoading → bool
-
Whether any page has been loaded.
no setter
- isSuccess → bool
-
Whether at least one page was loaded successfully.
no setter
-
pages
→ List<
TPage> -
All loaded pages in order.
final
- refetch → VoidCallback
-
Resets all pages and re-fetches from the first page.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → QueryStatus
-
The current status.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited