We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
8fd07f0
androidx.lifecycle:lifecycle-viewmodel-savedstate:1.0.0-beta01
intent.putExtraEnum("key", YourEnum.ENUM_VALUE)
bundle.putEnum("key", YourEnum.ENUM_VALUE)
var yourEnum: YourEnum by savedStateProperty("key")
val yourEnum: MutableLiveData<YourEnum> by savedStateLiveData("key")
var yourClass: YourClass by savedStateProperty<String, YourClass>({ Json.parse(YourClass.serializer(), it) }, { Json.stringify(YourClass.serializer(), it) }, "key")
val yourClass: MutableLiveData<YourClass> by savedStateLiveData<String, YourClass>({ Json.parse(YourClass.serializer(), it) }, { Json.stringify(YourClass.serializer(), it) }, "key")