All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.makeevrserg.mobilex.paging.data.LambdaPagedListDataSource.kt Maven / Gradle / Ivy

There is a newer version: 2.7.3
Show newest version
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