Created
October 25, 2022 15:44
-
-
Save Astroa7m/2830363bed3485d2918fd06105bc032a to your computer and use it in GitHub Desktop.
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()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment