commonMain.ru.astrainteractive.klibs.paging.data.LambdaPagedListDataSource.kt Maven / Gradle / Ivy
package ru.astrainteractive.klibs.paging.data
import ru.astrainteractive.klibs.paging.context.PageContext
import ru.astrainteractive.klibs.paging.state.PagingState
/**
* This will allows you to use lambda data source
*/
class LambdaPagedListDataSource(
private val loadPageLambda: suspend (PagingState) -> Result>
) : PagedListDataSource {
override suspend fun getListResult(pagingState: PagingState): Result> {
return loadPageLambda.invoke(pagingState)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy