Skip to content

Instantly share code, notes, and snippets.

@1jGabriel
Created January 23, 2021 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1jGabriel/80ff356de3033125ca4ed878d9b6a320 to your computer and use it in GitHub Desktop.
Save 1jGabriel/80ff356de3033125ca4ed878d9b6a320 to your computer and use it in GitHub Desktop.
class PersonageViewModel(
private val repository: PersonageRepository
) : ViewModel() {
fun getCharacters(): Flow<PagingData<CharacterUi>> {
return repository.getPersonages().cachedIn(viewModelScope)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment