Anyone know the work around for ignoring a val in ...
# android
s
Anyone know the work around for ignoring a val in a `Parcelize`d data class so I can avoid bundling it? My only thought as of right now is to make a separate data class for
UINonBundledState
, but I'd rather just have the annotation working. It gives me this error when trying to use it like I have in the example:
@IgnoredOnParcel is inapplicable to properties declared in the primary constructor
n
Few things to try:
@get:IgnoredOnParcel
but I suspect you’ll need to make
navigationState
nullable or try giving
navigationState
a default value. or try adding a secondary constructor