[Compose Multiplatform] Disable a button according to a list of flow values

Hello,

I’m a beginner at compose and kotlin. I have a page with a list of Permission flow (with a status enum). At the bottom I placed a button.

The issue is that Button accept only a Boolean but not a MutableState, so when the value change the button is still disabled

https://github.com/nicolas-f/NoiseCaptureKotlin/blob/48953662820027a50f144509dd2453d295f62f20/shared/src/commonMain/kotlin/org/noise_planet/noisecapture/shared/child/PermissionScreen.kt#L90

![image](https://github.com/JetBrains/compose-multiplatform/assets/1382241/6747a3f6-53b9-43da-8d97-ab1e1e31170f)

Do you know how to propagate change of flows to the button enabled status ?

Thanks

submitted by /u/CyclicIssue
[link] [comments]