PagerFlowSnapshotKt
public final class PagerFlowSnapshotKt
Summary
Public methods |
|
|---|---|
static final @NonNull List<@NonNull Value> |
@VisibleForTestingRuns the |
Public methods
asSnapshot
@VisibleForTesting
public static final @NonNull List<@NonNull Value> <Value extends Object> asSnapshot(
@NonNull Flow<@NonNull PagingData<@NonNull Value>> receiver,
@NonNull LoadErrorHandler onError,
@NonNull SuspendFunction1<@NonNull SnapshotLoader<@NonNull Value>, Unit> loadOperations
)
Runs the SnapshotLoader load operations that are passed in and returns a List of data that would be presented to the UI after all load operations are complete.
| Parameters | |
|---|---|
@NonNull LoadErrorHandler onError |
The error recovery strategy when PagingSource returns LoadResult.Error. A lambda that returns an |
@NonNull SuspendFunction1<@NonNull SnapshotLoader<@NonNull Value>, Unit> loadOperations |
The block containing |