Mehmet Burak Akgün
04/20/2023, 4:34 PMMagdalena Tsolaki
04/20/2023, 5:38 PMDima Avdeev
04/20/2023, 6:02 PMval stateFlow = MutableStateFlow<YourState>(...)
After that - you can subscribe to state changes with in Composable function with:
val state = stateFlow.collectAsState()
And draw that state:
Text(state.value.toString())
Dima Avdeev
04/20/2023, 6:05 PMtylerwilson
04/20/2023, 6:59 PMMehmet Burak Akgün
04/20/2023, 9:03 PMDima Avdeev
04/21/2023, 4:58 AMval state = remember{ mutableStateOf(MyState()) }
Read and change this state state.value