FetchContext<T> class
A mutable context object passed to QueryBehavior.onFetch.
The behavior replaces fetchFn with its own async closure; Query then
wraps that closure in a single Retryer — exactly like React's
Query.#retryer pattern.
Constructors
-
FetchContext({required Future<
T> fetchFn(), required FetchMeta? meta, required QueryOptions<T> options, required QueryCacheEntry? currentEntry})
Properties
- currentEntry → QueryCacheEntry?
-
The current cache entry (may be null for the first fetch).
final
-
fetchFn
↔ Future<
T> Function() -
The default fetch function (from QueryOptions.queryFn).
A QueryBehavior replaces this to implement custom fetch logic.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- meta → FetchMeta?
-
Metadata that describes WHY this fetch is happening (e.g. paginate forward).
final
-
options
→ QueryOptions<
T> -
The options associated with the query.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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