RouteSwitch

fun RouteSwitch(coordinator: Coordinator, content: @Composable (route: IRoute) -> Unit)

Observes a Coordinator and switches out content based on the current route.

Parameters

coordinator

The Coordinator to observe.

content

The composable content to switch between routes. The current route to render is provided as the parameter of the block.


fun RouteSwitch(router: IRouter, content: @Composable (route: IRoute) -> Unit)

Observes an IRouter and switches out content based on the current route.

Parameters

router

The Router to observe.

content

The composable content to switch between routes. The current route to render is provided as the parameter of the block.


fun RouteSwitch(coordinatorObserver: ICoordinatorObserver, content: @Composable (route: IRoute) -> Unit)

Observes an ICoordinatorObserver and switches out content based on the current route.

Parameters

coordinatorObserver

The ICoordinatorObserver to observe.

content

The composable content to switch between routes. The current route to render is provided as the parameter of the block.