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.