Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Home view model with paging data stream
class HomeViewModel(private val gamesSource: GamesSource) :
ViewModel() {
fun getAllGames(): Flow<PagingData<GameResultsEntity>> {
return Pager(PagingConfig(50)) { gamesSource }.flow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment