After updating Android Studio to Jellyfish, when I try to create a compose function using the “comp” keyword, the modifier is automatically added as a parameter to the function, how do I disable this?
In AS Jellyfish this was added as default behavior. To change it, move to Settings/Editor/Live templates, then find a comp
template. You’ll see something like this
@androidx.compose.runtime.Composable
fun $NAME$(modifier: androidx.compose.ui.Modifier = androidx.compose.ui.Modifier) {
$END$
}
Now change it to
@androidx.compose.runtime.Composable
fun $NAME$() {
$END$
}
To restore default settings, click on template again with right mouse button then choise restore defaults
as on screen below.
Do not forget apply changes.