Hi want to know how can we return `Column/Row` through lamda function in jetpack compose. I tried so...
k
Hi want to know how can we return
Column/Row
through lamda function in jetpack compose. I tried something but it giving me error. PairContent
Copy code
@Composable
fun PairContent(
    bluetoothEnable: (ColumnScope) -> Unit,
) {
    AnimatedVisibility(visible = true) {
        Scaffold {
            Column { columnScope ->
                bluetoothEnable(columnScope)
            }
        }
    }
}
Error
Copy code
Type mismatch.
Required:
ColumnScope.() → Unit
Found:
ColumnScope.(Any?) → Unit

Cannot infer a type for this parameter. Please specify it explicitly.
message has been deleted
p
Try
bluetoothEnable: ColumnScope.() -> Unit
k
Great it works..
p
Also remove
columnScope ->
You are already in a ColumnScope
k
okk
Thank you