Mehdi Haghgoo
03/23/2021, 12:28 PMMehdi Haghgoo
03/23/2021, 12:29 PMsealed class Screen(val route: String, @StringRes val resourceId: Int) {
  object Profile : Screen("profile", R.string.profile)
  object FriendsList : Screen("friendslist", R.string.friends_list)
}
Marc Knaup
03/23/2021, 1:16 PMProfile
and FriendsList
are the only subclasses of Screen
and there are no others. That’s because it’s sealed
.
https://kotlinlang.org/docs/sealed-classes.htmlMehdi Haghgoo
03/23/2021, 5:11 PM