Arkadii Ivanov
06/15/2025, 11:09 AMSavedState
and ViewModelStore
, since they both are now multiplatform. However, I noticed (correct me if I'm wrong) that the actual serialization of SavedState
to bytes is only possible on Android. On all other targets the SavedState
class is just a Map<String, Any?>
. My question is probably for folks from Google and JetBrains: are there any plans of supporting the actual serialization of SavedState
on non-Android targets? Or if it's already possible, I would like to learn how.Marcello Galhardo
06/18/2025, 9:20 AMSavedState
to bytes is only supported on Android. It’s definitely something we have discussed and would like to have in the future, but no ETA. I just realized there’s no public ticket for that, would you mind filing one?
Also, while SavedState
is KMP-compatible and is integrated with CMP, CMP doesn’t actually save state on non-Android platforms (yet). JetBrains is the best people to speak to that part. cc: @Ivan MatkovArkadii Ivanov
06/19/2025, 10:09 AM