我想知道如何通过Jetpack Compose中的Lamda函数返回Column/Row
.我try 了一些东西,但它给了我错误.
PairContent个
@Composable
fun PairContent(
bluetoothEnable: (ColumnScope) -> Unit,
) {
AnimatedVisibility(visible = true) {
Scaffold {
Column { columnScope ->
bluetoothEnable(columnScope)
}
}
}
}
Error个
Type mismatch.
Required:
ColumnScope.() → Unit
Found:
ColumnScope.(Any?) → Unit
Cannot infer a type for this parameter. Please specify it explicitly.
Error in image个