Slide 37
Slide 37 text
@Composable
private fun LegoSetDetailScreen(
legoSet: LegoSet,
onBackClick: ()
->
Unit,
onRentClick: (Duration)
->
Unit,
modifier: Modifier = Modifier
) {
Scaffold(
topBar = {
TopAppBar(
title = { Text("Set Details") },
navigationIcon = {
IconButton(onClick = onBackClick) {
Icon(Icons.AutoMirrored.Filled.ArrowBack, "Back")
}
},
actions = {
IconButton(onClick = { legoSet.toggleFavorite() }) {
Icon(
if (legoSet.isFavorite) Icons.Filled.Favorite
else Icons.Filled.FavoriteBorder,
"Favorite"
)
}
}
)
}
)
..
.
Kotlin / UI