Disable button in kotlin programmatically

I’m learning kotlin with previous experience in SwiftUI. Is there any way to disable button with modifier, depending on the state variable in Kotlin?
I want to disable the button, for example if some boolean variable is true

Button(onClick = {},
            modifier = Modifier.size(width = 200.dp, height = 50.dp),
            content = {
                Text(text = "Continue")

Like this in SwiftUI:

Button("Continue") {

>Solution :

Try this parameter on the button composable

Button(enabled = false, onClick = {}) {

Leave a Reply