Skip to content

Instantly share code, notes, and snippets.

@skydoves
Last active September 9, 2024 11:19
Show Gist options
  • Save skydoves/4060228cb692e97b4a0a22acbdc5c5e6 to your computer and use it in GitHub Desktop.
Save skydoves/4060228cb692e97b4a0a22acbdc5c5e6 to your computer and use it in GitHub Desktop.
timeline
val timelineUi by timelineViewModel.timelineUi.collectAsStateWithLifecycle()
Column(
modifier = Modifier
.fillMaxSize()
.padding(12.dp),
verticalArrangement = Arrangement.spacedBy(12.dp)
) {
timelineUi.components.forEach { uiComponent ->
uiComponent.Consume(
version = timelineUi.uiVersion,
navigator = { clickedComponent ->
navigateToDetails.invoke(clickedComponent, timelineUi.version)
}
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment