can you add a secondary constructor to a data-clas...
# getting-started
t
can you add a secondary constructor to a data-class?
v
tipsy: yes, why not. It has to delegate to the primary constructor, that's all
t
thanks,
j
Not just possible, but actually necessary for Parcelable objects for Android. JetBrains even provide a plugin to do it automatically: https://plugins.jetbrains.com/plugin/8086-parcelable-code-generator-for-kotlin-