HopeState<T> class
Represents the current state of a HopeBuilder query.
Properties
- data → T?
-
The successfully fetched data. Null if not yet loaded or on error.
final
- error → Object?
-
The error from a failed fetch. Null if no error.
final
- hasData → bool
-
Data is present regardless of current fetch status.
no setter
- hasError → bool
-
Error is present.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasMore → bool?
-
Whether more pages are available to fetch. Only relevant for infinite queries.
final
- isError → bool
-
Fetch failed.
no setter
- isFetching → bool
-
True when any fetch is in progress — initial or background.
final
- isIdle → bool
-
Query is disabled via HopeOptions.enabled = false.
no setter
- isLoading → bool
-
First fetch in progress, no data yet.
no setter
- isLoadingMore → bool
-
True when a next-page fetch is in progress. Only relevant for infinite queries.
final
- isRefetching → bool
-
Background refetch in progress while data is already available.
no setter
- isSuccess → bool
-
Fetch completed successfully.
no setter
- lastUpdatedAt → DateTime?
-
When data was last successfully fetched.
final
-
pages
→ List<
T> ? -
All accumulated pages. Only populated when
getNextPageParamis provided.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fetchMore(
) → Future< void> -
Fetch the next page. Only available when
getNextPageParamis provided. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refetch(
) → Future< void> - Manually trigger a fresh fetch.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited