I want to initialize an observable map using an existing map. I tried
val myMap by rememberSaveable { mutableStateOf(otherMap) }
otherMap is a MutableMap<MyEnum, Boolean>. It crashed “java.lang.IllegalArgumentException: MutableState containing androidx.compose.runtime.snapshots.SnapshotStateMap cannot be saved using the current SaveableStateRegistry. The default implementation only supports types which can be stored inside the Bundle.”
I tried
val myMap by rememberSaveable { mutableStateMapOf<MyEnum, Boolean>(otherMap) }
and it fails to compile.