Skip to content

Instantly share code, notes, and snippets.

@Astroa7m
Created October 25, 2022 15:44
Show Gist options
  • Save Astroa7m/2830363bed3485d2918fd06105bc032a to your computer and use it in GitHub Desktop.
Save Astroa7m/2830363bed3485d2918fd06105bc032a to your computer and use it in GitHub Desktop.
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