commonMain.com.makeevrserg.mobilex.paging.data.LambdaPagedListDataSource.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of paging-jvm Show documentation
Show all versions of paging-jvm Show documentation
KMM library with frequently used code
package com.makeevrserg.mobilex.paging.data
import com.makeevrserg.mobilex.paging.state.PagingState
/**
* This will allows you to use lambda data source
*/
class LambdaPagedListDataSource(
private val loadPageLambda: suspend (PagingState) -> List?
) : PagedListDataSource {
override suspend fun getList(pagingState: PagingState): List? {
return loadPageLambda(pagingState)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy