Skip to content

Instantly share code, notes, and snippets.

@akitikkx
Created March 16, 2022 17:50
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 akitikkx/bca29d7c67cf31e8097a208dae811412 to your computer and use it in GitHub Desktop.
Save akitikkx/bca29d7c67cf31e8097a208dae811412 to your computer and use it in GitHub Desktop.
@Composable
fun ShowDetailScreen(
viewModel: ShowDetailViewModel = hiltViewModel(),
...
) {
...
val showCast = viewModel.showCast.observeAsState()
Surface(
modifier = Modifier
.fillMaxSize()
) {
Column {
Box(modifier = Modifier.fillMaxSize()) {
DetailArea(
...
showCast = showCast.value,
onCastItemClick = { onCastItemClick(it) },
...
)
if (isLoading.value == true) {
LinearProgressIndicator(
modifier = Modifier
.padding(8.dp)
.fillMaxWidth()
)
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment