StaleTimeDynamic class final Option values

The StaleTime.dynamic variant: a stale time computed from the query each time staleness is checked.

Inheritance

Constructors

StaleTimeDynamic(StaleTime compute(Query<Object?> query))
Computes the stale time with compute; prefer spelling it StaleTime.dynamic(…).
const

Properties

compute → StaleTime Function(Query<Object?> query)
Given the query, the stale time to apply. May itself return another StaleTime.dynamic; StaleTime.resolveFor unwraps until it reaches a plain value.
final
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

isStaticFor(Query<Object?> query) → bool
Whether this resolves to StaleTime.static for query — the one thing that separates it from StaleTime.infinite: a static query is skipped by refetchQueries and by every refetch trigger, and outranks an invalidation.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(Query<Object?> query) → Duration?
Resolves this to a plain duration for query. null means "never stale by time", which both StaleTime.static and StaleTime.infinite are.
inherited
resolveFor(Query<Object?> query) → StaleTime
This with any StaleTime.dynamic layer peeled off for query, so the result is one of StaleTimeDuration, StaleTimeStatic or StaleTimeInfinite.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override