Skip to content

Instantly share code, notes, and snippets.

@raamcosta
Created September 28, 2021 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raamcosta/ffef2c3830d244533949da7f66f42cda to your computer and use it in GitHub Desktop.
Save raamcosta/ffef2c3830d244533949da7f66f42cda to your computer and use it in GitHub Desktop.
Destination Extension example
@get:StringRes
val Destination.title get(): Int {
return when (this) {
ProfileScreenDestination -> R.string.profile_screen
LoginScreenDestination -> R.string.pogin_screen
MainFeedScreenDestination -> R.string.main_feed_screen
SearchScreenDestination -> R.string.search_screen
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment