ScreensController

actual class ScreensController
expect class ScreensController

Manages navigation between the screens declared when building ScreensNavigation.

Available via LocalScreensController.

Has separate implementations for Android and non Android targets.

actual class ScreensController

Constructors

Link copied to clipboard
constructor(navController: NavHostController?)
actual constructor(startRoute: String)
expect constructor(startRoute: String)
actual constructor(startRoute: String)

Properties

Link copied to clipboard
Link copied to clipboard

Read only list of current screen routes along with their navigation arguments, the stack is based on routesStack

Functions

Link copied to clipboard
actual fun pop(upToRoute: String?): Result<Unit>
expect fun pop(upToRoute: String? = null): Result<Unit>

Pops back to previous screen route on the routes stack.

actual fun pop(upToRoute: String?): Result<Unit>
Link copied to clipboard
actual fun push(route: String)
actual inline fun <Args> push(route: String, args: Args)
expect fun push(route: String)

Pushes new screen route on the routes stack without passing arguments. Effectively it changes current screen to the new screen for given route which are declared when building ScreensNavigation.

expect inline fun <Args> push(route: String, args: Args)

Pushes new screen route on the routes stack. Effectively it changes current screen to the new screen for given route which are declared when building ScreensNavigation.

actual fun push(route: String)
actual inline fun <Args> push(route: String, args: Args)