Christoph Wiesner
09/28/2022, 8:02 AMval iconContent: @Composable () -> Unit = {
Icon(...)
}
if (someCondition) {
// wrap the icon in a box to display some overlapping composable
Box(...) {
iconContent()
OverlayingComposable()
}
} else {
// 99% of the time the overlay is hidden - so only display the icon without the Box wrapper
iconContent()
}
is this unnecessary optimization? bc. readability gets worse - or is there another approach?jossiwolf
09/28/2022, 8:14 AMjossiwolf
09/28/2022, 8:15 AMChristoph Wiesner
09/28/2022, 8:18 AMshikasd
09/28/2022, 11:08 AM