Jetpack Compose - How can add multiple modifier to a composable and is the order important?

Viewed 2570

I wanted to know how we can add multiple modifier, for example adding background, padding and more to an android jetpack composable?

1 Answers

It's really simple; You can chain multiple modifiers.

Column(modifier = Modifier.preferredHeight(500.dp).padding(100.dp)) {
Text("Hello")  }

And The order is important; Modifier elements to the left are applied before modifier elements to the right.

Related