Skip to content

Instantly share code, notes, and snippets.

@Ahmad-Hamwi
Created March 18, 2023 21:09
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 Ahmad-Hamwi/7c0d0a283caffc68da2a9c56b50037d4 to your computer and use it in GitHub Desktop.
Save Ahmad-Hamwi/7c0d0a283caffc68da2a9c56b50037d4 to your computer and use it in GitHub Desktop.
@Composable
fun MyLazyList(
categories: List<Category>,
listState: LazyListState = rememberLazyListState(),
) {
LazyColumn(
state = listState,
verticalArrangement = Arrangement.spacedBy(16.dp)
) {
itemsIndexed(categories) { _, category ->
ItemCategory(category)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment