Hello everybody. I am trying to use ResultBackNavi...
# compose-destinations
i
Hello everybody. I am trying to use ResultBackNavigatorMyType where MyType is
Copy code
import kotlinx.serialization.Serializable

@Serializable
data class ModificationError(
    val myBoolean: Boolean,
)
The issue is I am getting the error [ksp] com.ramcosta.composedestinations.codegen.commons.IllegalDestinationsSetup: Composable 'AddEditFavoritesScreen', ResultBackNavigatorModificationError: Result types must be of a valid navigation argument type, but was 'ModificationError' Library version is 2.1.0-beta16 Kotlin serialization 1.8.0 I am using multimodule architecture and the screen destination and ModificationError are in different modules. I would be so grateful to hear any suggestions what may be the problem here. 🥲 Am i missing something?
r
Hello! try this please
Copy code
@Parcelize
data class ModificationError(
    val myBoolean: Boolean,
) : Parcelable
r
@Ilia Kazantsev try having the class in the same module. If I remember correctly, it won't work otherwise.
and issue is that KSP doesn't tell us info about classes on other modules, so it won't know that this class is Serializable. Even if it does, it won't create the necessary nav type for us to be able to serialize it.
i
@Rafael Costa yeah, it is working when the class in the same module @Robert C indeed, is working well with parcelable even in the different module I am a little bit confused, both
Copy code
kotlin-serialization
kotlin-parcelize
are gradle plugins 🤔
🙌 1
Thanks guys
Seems like because with @Parcelize I have to mark type as Parcelable
👍 1