NavigationController

Thin wrapper over one Navigation3 NavBackStack — the object registered in NavigatorsHolder under a navigatorId, and what Navigate/NavigateUp/NavigateClearingStack actually operate on. One instance per backstack — the app's own root one (built in MosaicApplication) and one per currently-composed NestedNavigationGraph tile.

Constructors

Link copied to clipboard
constructor(backStack: NavBackStack<ScreenNavKey>)

Properties

Link copied to clipboard

the underlying Navigation3 back stack this controller wraps.

Functions

Link copied to clipboard
fun goBack()

Pops the last entry off this backstack, if any — the mechanism behind NavigateUp. A no-op if the stack is already empty.

Link copied to clipboard
fun navigate(destination: String, navigationData: Map<String, AnySerializable>? = null, poppingUpTo: PopUpTo? = null, launchSingleTop: Boolean = true)

Pushes destination onto this backstack — the mechanism behind Navigate.

Link copied to clipboard
fun navigateClearingStack(destination: String, navigationData: Map<String, AnySerializable>? = null, launchSingleTop: Boolean = true)

Clears this backstack entirely and pushes destination as its only entry — the mechanism behind NavigateClearingStack.