Skip to content

Instantly share code, notes, and snippets.

@1jGabriel
Last active January 23, 2021 18:06
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/02a0318bf0ba69052b5020d56cff7047 to your computer and use it in GitHub Desktop.
Save 1jGabriel/02a0318bf0ba69052b5020d56cff7047 to your computer and use it in GitHub Desktop.
PersonageListComposable
@Composable
fun CharacterList(characters: Flow<PagingData<CharacterUi>>) {
val lazyCharacters: LazyPagingItems<CharacterUi> = characters.collectAsLazyPagingItems()
LazyColumn {
items(lazyPagingItems = lazyCharacters) { character ->
character?.let {
CharacterItem(character = character)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment