Skip to content

Instantly share code, notes, and snippets.

@1jGabriel

1jGabriel/Pager.kt

Created Jul 19, 2020
Embed
What would you like to do?
Pager Sample
fun getItems(): Flow<PagingData<MyModel>> {
return Pager(
config = PagingConfig(pageSize = 20),
pagingSourceFactory = { MyPagingSource(api = api) }
).flow.cachedIn(viewModelScope)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.