I know I can change the state
with mutableStateListOf
in Code B.
Can I use MutableStateFlow(mutableListOf<Int>())
launch a Flow collect in Code A?
If not, is there a similar Flow function just like mutableStateListOf
?
Code A
val stateFlow = MutableStateFlow(mutableListOf<Int>())
stateFlow.value.add(1)
stateFlow.value.add(2)
Code B
val listExpandedMInfoID = mutableStateListOf<Int>()
listExpandedMInfoID.add(mInfo.id)