Skip to content

Instantly share code, notes, and snippets.

@AlexZhukovich
Created February 7, 2020 12:17
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 AlexZhukovich/084fcf7d89e1080d574b62eb25b5a79b to your computer and use it in GitHub Desktop.
Save AlexZhukovich/084fcf7d89e1080d574b62eb25b5a79b to your computer and use it in GitHub Desktop.
Jetpack Compose - combine composable functions
@Composable
fun CoffeeDrinkCard(
coffeeDrink: CoffeeDrinkModel
) {
MaterialTheme {
Column {
Row {
CoffeeDrinkLogo(id = coffeeDrink.imageUrl)
Container(alignment = Alignment.TopLeft,modifier = LayoutFlexible(1f)) {
Column {
CoffeeDrinkTitle(title = coffeeDrink.name)
CoffeeDrinkIngredient(ingredients = coffeeDrink.ingredients)
}
}
CoffeeDrinkFavouriteIcon(
favouriteState = coffeeDrink.isFavourite,
onValueChanged = { onFavouriteStateChanged(coffeeDrink) }
)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment