chRyNaN / serialization-parcelable

Android Parcelable support for the Kotlinx Serialization library.
Apache License 2.0
70 stars 3 forks source link

Support nullable types #4

Closed tadfisher closed 1 year ago

tadfisher commented 1 year ago

Fixes #3

Relax the type constraint on encodeToBundle and decodeFromBundle functions that use KSerializer<T> or look up serializers via serializersModule.

Align the type constraint on rememberSaveable and Saver to match upstream compose; there is still an : Any constraint for rememberSaveable<T : Any> : T but there is none on rememberSaveable<T> : MutableState<T>.

Also, quickly configure the desktop version of sample-compose for easy testing.

chRyNaN commented 1 year ago

@tadfisher I apologize, I missed this PR. After I saw issue #3, I started hacking away at the solution trying to be diligent, and released the fix already. The solution seems the same. If you'd like, you could make a separate PR adding the sample-compose desktop logic to the build file you added in these changes. Sorry again.