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 and onError are live only for index-based sources. A PageFetcher.withSignal source threads a per-page signal, so page k needs page k-1: its reload walks in order and is always atomic, since a half-rewritten cursor chain can't be committed. Scroll depth is still kept, just without the tuning.

A page still loading when the pull happens is dropped and asked again, so pre-refresh data can't land on top of the refreshed pages.

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, 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 engine calls this, never the consumer, the same way nobody calls Widget.build by hand.
toString() String
A string representation of this object.
override

Operators

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