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.
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
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.
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