Hinaka
06/12/2024, 11:12 AMAssistChip(
onClick = {},
label = {
Text(text = label)
},
enabled = enabled,
leadingIcon = optionalLeadingIcon?.let {
{
Icon(
it,
contentDescription = "Localized description",
Modifier.size(AssistChipDefaults.IconSize)
)
}
},
trailingIcon = optionalTrailingIcon?.let {
{
Icon(
it,
contentDescription = "Localized description",
Modifier.size(AssistChipDefaults.IconSize)
)
}
},
)
Is there a better way to improve the check if not null return a composable function? I'm thinking of create a new scope function named letCompose
so that I don't have to use double { {
and } }
Rajar
06/12/2024, 1:55 PM{ {
& } }
are fine and simple, we use them in our codebase