Skip Navigation

Type Safety in Navigation Compose using objects inside the object route

medium.com /@edmiro/type-safety-in-navigation-compose-23c03e3d74a5

If you try to navigate in compose using a route like this:

 kotlin
    
data class ProfileRoute(user: UserProfile)

data class UserProfile(id: String)


  

You will have an error when running the app. This article helped me with that.

I still don't know, however, how to navigate with a scenario like this:

 kotlin 
    
data class ProfileRoute(user: UserProfile)

data class UserProfile(account: Account)

  

This scenario above still crashes the application.

2 comments