toList

fun <P : IviPagingSource<E>, E : Any> Flow<P>.toList(): Flow<List<E>>

Transforms this IviPagingSource to a List containing elements of type E with all elements from the IviPagingSource.


fun <P : IviPagingSource<E>, E : Any> LiveData<P>.toList(timeout: Duration = Duration.ZERO): LiveData<List<E>>

Transforms this IviPagingSource to a List containing elements of type E with all elements from the IviPagingSource. If the returned LiveData becomes inactive while values are still being emited, the underlying coroutine will be cancelled after the timeout, unless the LiveData becomes active again before that timeout. By default timeout is Duration.ZERO, which means that once the returned LiveData becomes inactive it is not usable anymore.