IviDataSourceHelper

class IviDataSourceHelper<E : Any, Q : Any>(pagingSourceFactory: (Q) -> IviPagingSource<E>)

Provides a generic implementation for IviDataSource.createPagingSource and IviDataSource.createPagingSourceFlow. The implementation invokes pagingSourceFactory whenever a new IviPagingSource needs to be created.

Constructors

Link copied to clipboard
fun <E : Any, Q : Any> IviDataSourceHelper(pagingSourceFactory: (Q) -> IviPagingSource<E>)

Functions

Link copied to clipboard
fun createPagingSource(query: Q, lifecycleOwner: LifecycleOwner): IviPagingSource<E>
Link copied to clipboard
fun createPagingSourceFlow(query: Q): Flow<IviPagingSource<E>>