https://kotlinlang.org logo
#flow
Title
# flow
d

Daniele B

09/14/2020, 9:37 PM
The shared model I am working on (in
commonMain
) looks like this:
Copy code
class CoreViewModel {
    internal val mutableStateFlow = MutableStateFlow(AppState())
    val stateFlow: StateFlow<AppState>
        get() = mutableStateFlow
}
Can anyone show how it’s possible to collect the
StateFlow
value in Swift, on the iosApp side? I am looking for a way to connect the StateFlow value to an ObservableObject.
if anyone is interested, I opened an issue here: https://youtrack.jetbrains.com/issue/KT-41953
7 Views