InfiniteQueryState<T> class

Represents the state of an infinite query, holding pages of data of type T.

Inheritance

Constructors

InfiniteQueryState({QueryStatus status = QueryStatus.initial, List<T>? data, dynamic error, DateTime? dataUpdatedAt, DateTime? errorUpdatedAt, bool isFetching = false, bool isFetchingNextPage = false, bool hasNextPage = false})
Creates a new InfiniteQueryState.
const

Properties

data List<T>?
The data returned by the query.
finalinherited
dataUpdatedAt DateTime?
The timestamp when the data was last updated.
finalinherited
error → dynamic
The error returned by the query, if any.
finalinherited
errorUpdatedAt DateTime?
The timestamp when the error was last updated.
finalinherited
hasData bool
Whether the query has data.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasNextPage bool
Indicates whether there is another page available to fetch.
final
isError bool
Whether the query resulted in an error.
no setterinherited
isFetching bool
Whether the query is currently fetching data.
finalinherited
isFetchingNextPage bool
Indicates whether the next page is currently being fetched.
final
isInitial bool
Whether the query is in the initial state.
no setterinherited
isLoading bool
Whether the query is currently loading (fetching and has no data).
no setterinherited
isSuccess bool
Whether the query was successful.
no setterinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status QueryStatus
The current status of the query.
finalinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

copyWith({QueryStatus? status, List<T>? data, dynamic error, DateTime? dataUpdatedAt, DateTime? errorUpdatedAt, bool? isFetching, bool? isFetchingNextPage, bool? hasNextPage}) InfiniteQueryState<T>
Creates a copy of the query state with the given fields replaced with the new values.
override
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