ReloadToCurrentDepth class final

Re-fetches every currently-loaded page so a pull-to-refresh keeps the user's scroll depth instead of snapping back to the first page.

concurrency bounds how many page-fetches run at once: 1 (the default) reloads one page at a time, null reloads them all together, K keeps at most K in flight (a pool that refills as slots free). onError decides how a failed page-fetch settles; see ReloadOnError.

Both knobs are live only for index-based sources (a plain PageFetcher, where page k is fetchable from k alone). A PageFetcher.withSignal source threads a per-page signal, so its reload runs sequentially and atomically regardless of these settings: a broken cursor chain can't be partially committed. It still keeps scroll depth, just without the tuning.

Inheritance

Constructors

ReloadToCurrentDepth({int? concurrency = 1, ReloadOnError onError = .commitSucceeded})
Creates a reload-to-current-depth strategy.
const

Properties

concurrency int?
The most page-fetches to run at once: 1 (the default) sequential, null all together, K at most K in flight. Ignored for withSignal sources, which always reload sequentially.
final
hashCode int
The hash code for this object.
no setterinherited
onError ReloadOnError
How the reload settles when a page-fetch fails; best-effort (ReloadOnError.commitSucceeded) by default. Ignored for withSignal sources, which are always atomic.
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
run<T extends Object>(ReloadContext<T> context) Future<void>
Performs the reload through context. The async engine calls this on each pull-to-refresh; consumers construct a variant but never call it, like building a Widget without calling build.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited