Burhan Kamran
12/05/2023, 7:44 AMVlad
12/05/2023, 3:46 PM@Composable
fun MyText(
modifier: Modifier,
value: String
) {
Text(
modifier = modifier
.then(
other = if (value.isEmpty()) {
Modifier
.background(color = Color.Red)
} else {
Modifier
}
),
text = value,
)
}
Pretty much sure those function could very useful if you actually have heavy usage of modifiers and pass the same instance of some base modifier to different functionsZach Klippenstein (he/him) [MOD]
12/05/2023, 7:07 PMModifier.composed
is basically deprecatedbrandonmcansh
12/05/2023, 9:15 PMZach Klippenstein (he/him) [MOD]
12/05/2023, 9:16 PMbrandonmcansh
12/05/2023, 9:17 PM