I am trying to make my Column
scrollable, but I am unable to do so
I tried this:
Scaffold(
topBar = {...},
bottomBar = {...},
floatingActionButton = {...}
) {
Column(
modifier = Modifier
.padding(it)
.verticalScroll(rememberScrollState())
.weight(weight = 1f, fill = false)
) {
/*stuff*/
}
But Android Studio shows the following error message:
None of the following functions can be called with the arguments supplied.
Modifier.weight(Float, Boolean = ...) defined in androidx.compose.foundation.layout.FlowColumnScopeInstance
Modifier.weight(Float, Boolean = ...) defined in androidx.compose.foundation.layout.FlowRowScopeInstance
Please help.
P.S: I am aware of the LazyColumn
composable, which is scrollable by default. But I’d like to stick with Column
for now.