zcash-android-wallet-sdk / cash.z.wallet.sdk.ext.android / androidx.paging.DataSource.Factory / toFlowPagedList

toFlowPagedList

fun <Key, Value> Factory<Key, Value>.toFlowPagedList(config: Config, initialLoadKey: Key? = null, boundaryCallback: BoundaryCallback<Value>? = null, fetchContext: CoroutineDispatcher = Dispatchers.IO): Flow<PagedList<Value>>

Constructs a Flow<PagedList>, from this DataSource.Factory, convenience for FlowPagedListBuilder.

No work (such as loading) is done immediately, the creation of the first PagedList is is deferred until the Flow is collected.

Parameters

config - Paging configuration.

initialLoadKey - Initial load key passed to the first PagedList/DataSource.

boundaryCallback - The boundary callback for listening to PagedList load state.

fetchExecutor - Executor for fetching data from DataSources.

See Also

LivePagedListBuilder

fun <Key, Value> Factory<Key, Value>.toFlowPagedList(pageSize: Int, initialLoadKey: Key? = null, boundaryCallback: BoundaryCallback<Value>? = null, fetchContext: CoroutineDispatcher = Dispatchers.IO): Flow<PagedList<Value>>

Constructs a Flow<PagedList>, from this DataSource.Factory, convenience for FlowPagedListBuilder.

No work (such as loading) is done immediately, the creation of the first PagedList is is deferred until the Flow is collected.

Parameters

pageSize - Page size.

initialLoadKey - Initial load key passed to the first PagedList/DataSource.

boundaryCallback - The boundary callback for listening to PagedList load state.

fetchExecutor - Executor for fetching data from DataSources.

See Also

FlowPagedListBuilder