KDestination

interface KDestination(source)

Base contract for all navigation destinations in a Kindling application.

A destination represents a unique route inside a Compose navigation graph.

Implement this interface (typically through a sealed class or sealed interface) to centralize route definitions and optional navigation arguments.

Example

sealed class Screen(
override val route: String
) : KDestination {

data object Splash : Screen("splash")
data object Home : Screen("home")

data object Profile : Screen("profile/{userId}") {
override val arguments = listOf(
navArgument("userId") {
type = NavType.StringType
}
)
}
}

Properties

Link copied to clipboard

Optional typed navigation arguments.

Link copied to clipboard
abstract val route: String

The unique navigation route.