Skip to content

Instantly share code, notes, and snippets.

@ajailani4
Created June 3, 2021 11:20
Show Gist options
  • Save ajailani4/cdd56c4e556272f0c82a9b65be6f2c3e to your computer and use it in GitHub Desktop.
Save ajailani4/cdd56c4e556272f0c82a9b65be6f2c3e to your computer and use it in GitHub Desktop.
class MainRepository @Inject constructor(
private val apiHelper: ApiHelper
) {
fun getBrandsHome() =
Pager(
config = PagingConfig(enablePlaceholders = false, pageSize = 5),
pagingSourceFactory = {
BrandsHomeDataSource(apiHelper)
}
).flow
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment