Leland Richardson [G]
08/25/2022, 5:21 PMContent1()
returns a @Composable () -> Unit
it should work fine. i think there used to be a bug related to this type of thing but shouldn’t be any more. please file one if it doesn’t workdimsuz
08/25/2022, 5:21 PMdimsuz
08/25/2022, 5:22 PMfun MyComposable(
value: Boolean,
slot1: @Composable () -> Unit = if (value) { Content1() } else { Content2() },
slot2: @Composable (() -> Unit)? = if (value) { Content1() } else null,
)
Leland Richardson [G]
08/25/2022, 5:23 PMdimsuz
08/25/2022, 5:26 PM