Skip to content

Instantly share code, notes, and snippets.

@krzdabrowski
Last active January 14, 2024 14:05
Show Gist options
  • Save krzdabrowski/f8e60ba50d806052fa366f114f0e262b to your computer and use it in GitHub Desktop.
Save krzdabrowski/f8e60ba50d806052fa366f114f0e262b to your computer and use it in GitHub Desktop.
const val ROCKET_DIVIDER_TEST_TAG = "rocketDividerTestTag"
@Composable
fun RocketsListContent(
rocketList: List<RocketDisplayable>,
(...)
) {
LazyColumn(...) {
itemsIndexed(
items = rocketList,
key = { _, rocket -> rocket.id }
) { index, item ->
RocketItem(
rocket = item,
(...)
)
if (index < rocketList.lastIndex) {
HorizontalDivider(
modifier = Modifier.testTag(ROCKET_DIVIDER_TEST_TAG)
)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment