can any one help me with the followings? 1. I am h...
# multiplatform
a
can any one help me with the followings? 1. I am having issues with integrating parcelize even after gradle finishes sync and build still can't import the parcelize 2. lifecycle's states for some reason on KMM compose app just restarts my app when i put the app in the background from any screen but the behavior should have been to restore from the left screen i.e from screen i swipe it into the background.
b
Are you by chance using Voyager for Screens/Navigation? If you're passing in things it can't serialize it would crash in the background/restart.
a
Yes using Voyger for navigation
b
There are a few posts about it on their github page like this one. https://github.com/adrielcafe/voyager/issues/340 I stopped passing constructor parameters into my screens. For the couple things I did need to get in I used CompositonLocal
a
i ll try some of the workaround and see if it helps from the issue,Thanks👍
b
Good luck
Also you can try marking all the constructor parameters as @Transient and see if it stops the crash. This caused some unexpected and undesirable behaviour for me and I didn't use it, but it should let you confirm that it stopped crashing?
a
Thanks, the problem was this line "_rememberSaveable" changing it to_ remember fixed all the issues. (but i wanted some way to have the sate of the dropdown list to maintain it last selected value i.e property) var properties by rememberSaveable { _mutableStateOf_<ListProperty>(_emptyList_()) }
b
Awesome 😃
🙌 1