Colton Idle
04/27/2021, 12:57 PMbuttonList[selected]()
I thought defining an argument into my composable like this would work
buttonList: List<@Composable ColumnScope.() -> Unit>
but then sending in a listOf(CustomButton(), CustomButton2())
doesn't actually work. Thoughts?Zach Klippenstein (he/him) [MOD]
04/27/2021, 1:06 PMCustomButton()
isn’t the custom button function, it is the return value of CustomButton
. You need to either pass a function reference or a lambda.Colton Idle
04/27/2021, 1:25 PMlistOf(() -> CustomButton(), () -> CustomButton2())
Zach Klippenstein (he/him) [MOD]
04/27/2021, 1:26 PMColton Idle
04/27/2021, 1:27 PMAdam Powell
04/27/2021, 1:29 PMColton Idle
04/27/2021, 1:30 PMTimo Drick
04/28/2021, 12:07 PMAdam Powell
04/28/2021, 1:28 PM