https://kotlinlang.org logo
#android
Title
# android
k

Khanzada Kashif

08/03/2022, 5:10 AM
rememberSaveAble does not support custom data types like User in your case, But you can use remember to store these, like this, var user by remember { mutableStateOf(User()) }
i

IsaacMart

08/03/2022, 6:59 AM
Thanks @Khanzada Kashif for that insight. I got a way around it. My problem was in the viewModel. I was using channels instead of mutableStateFlow so that i could collectAsFlow on the composable. Had to dig deep to understand to type of flows.Thanks for comming through.
k

Khanzada Kashif

08/04/2022, 8:37 AM
Always happy to help