Last active
January 23, 2021 18:06
-
-
Save 1jGabriel/02a0318bf0ba69052b5020d56cff7047 to your computer and use it in GitHub Desktop.
PersonageListComposable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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