Created
February 7, 2020 12:17
-
-
Save AlexZhukovich/084fcf7d89e1080d574b62eb25b5a79b to your computer and use it in GitHub Desktop.
Jetpack Compose - combine composable functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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