Created
October 25, 2022 16:43
-
-
Save Astroa7m/6f5cfd3001bef5d2053642d0c4fa8f93 to your computer and use it in GitHub Desktop.
final Destinations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class Destinations(val route: String) { | |
object Home : Destinations("home") | |
object Details : Destinations("details/{userId}") { | |
fun setAndGetArgumentRoute(id: Int) = route.replace("{userId}", id.toString()) | |
} | |
// add this | |
object AddNewUser : Destinations("add_new_user") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment