Hi everyone!, do you know if it is possible create...
# multiplatform
s
Hi everyone!, do you know if it is possible create an object that has a StateFlow in order to change this state in iosApp and common main?
Copy code
object NavigationAppViewModel {
    private val _shouldShowFirstViewController = MutableStateFlow(false)
    val shouldShowFirstViewController: StateFlow<Boolean> = _shouldShowFirstViewController

    fun toggleViewController() {
        _shouldShowFirstViewController.value = !_shouldShowFirstViewController.value
    }
}
this is the object and I want to use this function
toggleViewController
in common main using compose multiplatform and iosApp context: Im usign compose multiplatform and in a specific moment i want to change the ViewController used in iosApp to use just swift but also I want to go back to compose when this variable change
#multiplatform Anyone know something about this? if it is possible make a transition between controllers in ios app reading a stateFlow from anobject?