https://kotlinlang.org logo
#compose
Title
# compose
n

napperley

05/20/2019, 3:51 AM
Is it possible to setup all properties in a function call code block and drop the parenthesis? Eg:
Copy code
@Composable
fun StoryWidget(story: StoryData) {
    // ...
    Card {
        cornerRadius = 4.dp
        elevation = 4.dp
        columns += Column {
            children += Image { file = image }
            children += Padding {
                spacing = 16.dp
                content = Text { content = story.headline }
            }
        }
    }
}
e

elizarov

05/20/2019, 6:45 AM
Mutable widgets? It’s like in UI libraries of 1980-2010? Mutable widgets are antithesis of pure functions that are the core concepts of compose and other modern reactive frameworks.
2 Views