Skip to content

Instantly share code, notes, and snippets.

@Ahmad-Hamwi
Created March 18, 2023 21:09
Show Gist options
  • 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