navigateTo

fun navigateTo(path: String, replaceCurrent: Boolean = false, synthesizeBackstack: Boolean = false, paramBuilder: NavigationParameterBuilder.() -> Unit? = null): NavigationBuilder(source)

Navigate to a path with optional parameters.

Parameters

path

The route path to navigate to

replaceCurrent

If true, replaces the current entry instead of pushing

synthesizeBackstack

If true, automatically builds the backstack based on path hierarchy.

paramBuilder

Optional builder for navigation parameters


fun navigateTo(navigatable: Navigatable, replaceCurrent: Boolean = false, synthesizeBackstack: Boolean = false): NavigationBuilder(source)

Navigate to a Navigatable instance with full-path resolution.

Unlike navigateTo with a string path, this overload resolves the navigatable's full path from the navigation graph, so nested screens are found correctly.

Parameters

navigatable

The navigatable to navigate to

replaceCurrent

If true, replaces the current entry instead of pushing

synthesizeBackstack

If true, automatically builds the backstack based on path hierarchy.


inline suspend fun <T : Screen> navigateTo(replaceCurrent: Boolean = false, synthesizeBackstack: Boolean = false): NavigationBuilder(source)


inline suspend fun <T : Navigatable> navigateTo(replaceCurrent: Boolean = false, preferredGraphId: String? = null, synthesizeBackstack: Boolean = false, noinline paramBuilder: NavigationParameterBuilder.() -> Unit? = null): NavigationBuilder(source)

Navigate to a screen type with optional parameters.

Parameters

replaceCurrent

If true, replaces the current entry instead of pushing

preferredGraphId

Optional graph ID to prefer when resolving the target

synthesizeBackstack

If true, automatically builds the backstack based on path hierarchy.

paramBuilder

Optional builder for navigation parameters