Closed vycius closed 6 years ago
More info is here: http://grandstaish.github.io/paperparcel/
I don't know... Don't really like extending and implementing interface for each of the models.
Parcelable
is interface on Android. So you need to implement this interface if you want use Bundle::putParcelable
without any additional methods.
Parceler needs @Parcel
annotation, Paperparcel needs @PaperParcel
annotation.
With Paperparcel there is no Parcels::wrap
and Parcels::unwrap
, but you need to extend with : PaperParcelable
and define CREATOR
in companion object. KT example https://github.com/grandstaish/paperparcel/blob/master/examples/kotlin-example/src/main/kotlin/nz/bradcampbell/kotlinexample/State.kt
Irrelevant with Kotlin's Parcelize
There is a lot of warnings from Parceler when used with Kotlin data class:
Consider moving to another library for better Kotlin support e.g https://github.com/grandstaish/paperparcel