Kotlin 1.1.60 is recently out with the Parcelable support.
With this new feature, I created my data as:
@Parcelize
data class Question {
val id: String,
val title: String,
val detail: String
} : Parcelable
But this raise an error of This class implements Parcelable but does not provide a CREATOR field.
It seems like I still have to write tedious code to implement Parcel data, if so, what's the benefit of using @Parcelize ?
I would say this feature is still experimental. What you describe is a known bug: https://youtrack.jetbrains.com/issue/KT-19300
But it should not be preventing the code from being compiled as expected (try disregarding the warning and see if your code works as expected).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With