79653460

Date: 2025-06-04 20:44:50
Score: 1.5
Natty:
Report link

with Savedstate version 1.3.0, we can use like this


@Serializable
data class UiState(
    @Serializable(with = SnapshotStateListSerializer::class)
    val items: SnapshotStateList<String>,
    
    @Serializable(with = MutableStateSerializer::class)
    val text: MutableState<String>
)

https://developer.android.com/jetpack/androidx/releases/savedstate#1.3.0:\~:text=Add%20SnapshotStateListSerializer%20to%20support%20mutableStateListOf.

https://developer.android.com/jetpack/androidx/releases/savedstate#1.3.0:\~:text=Support%20%40Serializer(with%20%3D%20...)%20for%20MutableStateFlowSerializer%20and%20MutableStateSerializer%20(I90953)

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Barr