RefetchBehavior enum
Refetch behavior for queries
Matches TanStack Query's refetch modes for full semantic parity.
- Inheritance
- Available extensions
Values
- never → const RefetchBehavior
-
Never refetch (disabled)
- ifStale → const RefetchBehavior
-
Refetch only if data is stale (default)
- always → const RefetchBehavior
-
Always refetch, regardless of staleness Useful for critical data that must always be fresh (e.g., financial data)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - 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
-
shouldRefetch(
bool isStale) → bool -
Available on RefetchBehavior, provided by the RefetchBehaviorX extension
Check if refetch should occur given staleness -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
RefetchBehavior> - A constant List of the values in this enum, in order of their declaration.