dazza5000
05/05/2022, 7:54 PMmutableStateOf
or a StateFlow
/ LiveData
property from a ViewModel?Landry Norris
05/05/2022, 7:59 PMColton Idle
05/05/2022, 8:17 PMdazza5000
05/05/2022, 8:17 PMmutableStateOf
Landry Norris
05/05/2022, 8:29 PMval state by fooFlow.collectAsState(defaultFoo)
to avoid having to put state.value
everywhere. You can just use the state variable directly, which I find idiomatic enough. Bonus points for using a data class for state and having your state for the screen all come from a single flow.dazza5000
05/13/2022, 3:17 PMmutableStateOf
property https://github.com/android/nowinandroid