dead.fish
04/26/2023, 11:26 AMkotlinx-parcelize
, gained support for `value class`es, but I still get Type is not directly supported by 'Parcelize'. Annotate the parameter type with '@RawValue' if you want it to be serialized using 'writeValue()'
. Has anybody some info on this?dead.fish
04/26/2023, 11:32 AM@RawValue
is not useful, as this throws the value class
as is to the Parcel
, which then responds with Parcel: unknown type for value [to-string-representation-of-my-value-class]
ephemient
04/26/2023, 5:44 PM@JvmInline
@Parcelize
value class Id(val id: String) : Parcelable
@Parcelize
data class ParcelExample(val id: Id) : Parcelable
works fine for me in 1.8.20dead.fish
05/09/2023, 11:56 AM@Parcelable
, which is a little bummer. If you build up strong typing you want value class
types to not carry platform-specific implementations, so they’re universally usable. We’ve resided to let our value
classes implement Serializable
now, just like java.lang.String
and others actually do.ephemient
05/09/2023, 8:14 PMephemient
05/09/2023, 8:16 PMdead.fish
05/10/2023, 7:41 AM