Package-level declarations

Types

Link copied to clipboard

The specification for navigating from a ModalBottomSheetLayout

Link copied to clipboard
typealias BottomSheetContentBuilder = NavGraphBuilder.(bottomSheetNavigationState: StateFlow<BottomSheetNavigatorState?>) -> Unit
Link copied to clipboard
data class BottomSheetNavigatorState(val contentNavHostController: NavHostController, val sheetContentNavHostController: NavHostController, val sheetState: ModalBottomSheetState)

The State of a BottomSheetNavigator

Link copied to clipboard
Link copied to clipboard
class BottomSheetRouteController(contentRouteController: RouteController, sheetContentRouteController: BottomSheetSheetContentRouteController)

A controller that handles the BottomSheetRoute for a ModalBottomSheetLayout

class BottomSheetSheetContentNavHostComposableNavigator<Action : NavigationAction<*>>(bottomSheetNavigator: StateFlow<BottomSheetNavigatorState?>, resultHandlers: List<NavHostResultHandler<*, *>> = emptyList(), navigationMapper: @Composable (Action) -> ComposableNavSpec) : ComposableNavigator<Action>

A ComposableNavigator that navigates for the sheet content of a flow of BottomSheetNavigatorState

Link copied to clipboard
class BottomSheetSheetContentRouteController(bottomSheetNavigatorState: StateFlow<BottomSheetNavigatorState?>, coroutineScope: StateFlow<CoroutineScope?>) : RouteController

RouteController for the sheet content of a BottomSheetNavigatorState

Link copied to clipboard
Link copied to clipboard
sealed class ComposableNavSpec

Spec for navigating with a ComposableNavigator

Link copied to clipboard
class ModalBottomSheetNavigator<Action : NavigationAction<*>>(bottomSheetNavigatorState: StateFlow<BottomSheetNavigatorState?>, contentResultHandlers: List<NavHostResultHandler<*, *>> = emptyList(), sheetContentResultHandlers: List<NavHostResultHandler<*, *>> = emptyList(), navigationMapper: @Composable (Action) -> BottomSheetComposableNavSpec) : BottomSheetNavigator<Action>

A BottomSheetNavigator that is managed by a ModalBottomSheetLayout. Must have a ModalBottomSheetLayout set up higher in the View-hierarchy.

Link copied to clipboard
class NavHostComposableNavigator<Action : NavigationAction<*>>(navHostController: StateFlow<NavHostController?>, resultHandlers: List<NavHostResultHandler<*, *>> = emptyList(), parentRouteController: RouteController? = null, navigationMapper: @Composable (Action) -> ComposableNavSpec) : ProvidingNavHostComposableNavigator<Action, NavHostController>
Link copied to clipboard
class NavHostRouteController(provider: StateFlow<NavHostController?>, parentRouteController: RouteController? = null) : ProvidingNavHostRouteController<NavHostController>

Simple ProvidingNavHostRouteController where the provider is a flow of NavHostController

Link copied to clipboard

A ComposableNavigator that is managed by a NavHost. Must have a NavHost set up higher up in the View-hierarchy.

Link copied to clipboard

Abstract RouteController that navigates on a NavHostController provided by a Provider

Link copied to clipboard
class RootModalBottomSheetNavigator<Action : NavigationAction<*>>(navigationMapper: @Composable (Action) -> BottomSheetComposableNavSpec, initialSheetValue: ModalBottomSheetValue = ModalBottomSheetValue.Hidden, parentRouteController: RouteController? = null, contentRootResultHandlers: List<NavHostResultHandler<*, *>> = emptyList(), contentBuilder: BottomSheetContentBuilder, sheetContentBuilder: BottomSheetContentBuilder) : BottomSheetNavigator<Action>

A BottomSheetNavigator that creates and manages a ModalBottomSheetLayout. This should be on top of any ModalBottomSheetNavigator in the View-hierarchy

Link copied to clipboard
class RootNavHostComposableNavigator<Action : NavigationAction<*>>(navigationMapper: @Composable (Action) -> ComposableNavSpec, parentRouteController: RouteController? = null, rootResultHandlers: List<NavHostResultHandler<*, *>> = emptyList(), contentBuilder: RouteContentBuilder) : ComposableNavigator<Action>

A ComposableNavigator that creates and manages a NavHost. This should be on top of any NavHostComposableNavigator in the View-hierarchy

Link copied to clipboard
sealed class Route : ComposableNavSpec

Route for navigating within a RouteController.

Link copied to clipboard
Link copied to clipboard
interface RouteController

Controller for navigating to a Route

Properties

Link copied to clipboard

Key to be used to indicate an argument in a route that is associated with a NavigationBundleSpecRow

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
@JvmName(name = "singleValueUnitComposable")
inline fun <Action : SingleValueNavigationAction<Unit>> NavGraphBuilder.composable(noinline content: @Composable () -> Unit)
@JvmName(name = "singleValueDateComposable")
inline fun <Action : SingleValueNavigationAction<KalugaDate>> NavGraphBuilder.composable(noinline content: @Composable (KalugaDate) -> Unit)
@JvmName(name = "singleValueBooleanComposable")
inline fun <Action : SingleValueNavigationAction<Boolean>> NavGraphBuilder.composable(noinline content: @Composable (Boolean) -> Unit)
@JvmName(name = "singleValueBooleanArrayComposable")
inline fun <Action : SingleValueNavigationAction<BooleanArray>> NavGraphBuilder.composable(noinline content: @Composable (BooleanArray) -> Unit)
@JvmName(name = "singleValueByteComposable")
inline fun <Action : SingleValueNavigationAction<Byte>> NavGraphBuilder.composable(noinline content: @Composable (Byte) -> Unit)
@JvmName(name = "singleValueByteArrayComposable")
inline fun <Action : SingleValueNavigationAction<ByteArray>> NavGraphBuilder.composable(noinline content: @Composable (ByteArray) -> Unit)
@JvmName(name = "singleValueCharComposable")
inline fun <Action : SingleValueNavigationAction<Char>> NavGraphBuilder.composable(noinline content: @Composable (Char) -> Unit)
@JvmName(name = "singleValueCharArrayComposable")
inline fun <Action : SingleValueNavigationAction<CharArray>> NavGraphBuilder.composable(noinline content: @Composable (CharArray) -> Unit)
@JvmName(name = "singleValueCharSequenceComposable")
inline fun <Action : SingleValueNavigationAction<CharSequence>> NavGraphBuilder.composable(noinline content: @Composable (CharSequence) -> Unit)
@JvmName(name = "singleValueDoubleComposable")
inline fun <Action : SingleValueNavigationAction<Double>> NavGraphBuilder.composable(noinline content: @Composable (Double) -> Unit)
@JvmName(name = "singleValueDoubleArrayComposable")
inline fun <Action : SingleValueNavigationAction<DoubleArray>> NavGraphBuilder.composable(noinline content: @Composable (DoubleArray) -> Unit)
@JvmName(name = "singleValueFloatComposable")
inline fun <Action : SingleValueNavigationAction<Float>> NavGraphBuilder.composable(noinline content: @Composable (Float) -> Unit)
@JvmName(name = "singleValueFloatArrayComposable")
inline fun <Action : SingleValueNavigationAction<FloatArray>> NavGraphBuilder.composable(noinline content: @Composable (FloatArray) -> Unit)
@JvmName(name = "singleValueIntComposable")
inline fun <Action : SingleValueNavigationAction<Int>> NavGraphBuilder.composable(noinline content: @Composable (Int) -> Unit)
@JvmName(name = "singleValueIntArrayComposable")
inline fun <Action : SingleValueNavigationAction<IntArray>> NavGraphBuilder.composable(noinline content: @Composable (IntArray) -> Unit)
@JvmName(name = "singleValueLongComposable")
inline fun <Action : SingleValueNavigationAction<Long>> NavGraphBuilder.composable(noinline content: @Composable (Long) -> Unit)
@JvmName(name = "singleValueLongArrayComposable")
inline fun <Action : SingleValueNavigationAction<LongArray>> NavGraphBuilder.composable(noinline content: @Composable (LongArray) -> Unit)
@JvmName(name = "singleValueShortComposable")
inline fun <Action : SingleValueNavigationAction<Short>> NavGraphBuilder.composable(noinline content: @Composable (Short) -> Unit)
@JvmName(name = "singleValueShortArrayComposable")
inline fun <Action : SingleValueNavigationAction<ShortArray>> NavGraphBuilder.composable(noinline content: @Composable (ShortArray) -> Unit)
@JvmName(name = "singleValueStringComposable")
inline fun <Action : SingleValueNavigationAction<String>> NavGraphBuilder.composable(noinline content: @Composable (String) -> Unit)
@JvmName(name = "singleValueDateArrayComposable")
inline fun <Action : SingleValueNavigationAction<List<KalugaDate>>> NavGraphBuilder.composable(noinline content: @Composable (List<KalugaDate>) -> Unit)
@JvmName(name = "singleValueStringArrayComposable")
inline fun <Action : SingleValueNavigationAction<List<String>>> NavGraphBuilder.composable(noinline content: @Composable (List<String>) -> Unit)
inline fun <Value, Action : SingleValueNavigationAction<Value>> NavGraphBuilder.composable(serializer: KSerializer<Value>, noinline content: @Composable (Value) -> Unit)

Adds a Composable for an Action to the NavGraphBuilder

Link copied to clipboard
fun HardwareBackButtonNavigation(onBackButtonClickHandler: suspend () -> Unit)

Adds a handler for a hardware back button

Link copied to clipboard

Creates a route string associated with a NavigationAction class given its NavigationBundleSpec. The route created by this method will create placeholders for all properties of the spec

Link copied to clipboard

Creates a route string for a NavigationAction. The route created by this method will will in all arguments of the action into the route.

Link copied to clipboard
fun SetupNavHost(navHostController: NavHostController, startDestination: String, builder: NavGraphBuilder.() -> Unit)

Creates a a NavHost for a given NavHostController

fun SetupNavHost(navHostController: StateFlow<NavHostController?>, rootView: @Composable () -> Unit = { Spacer(modifier = Modifier.fillMaxWidth()) }, builder: RouteContentBuilder)

Creates a a NavHost for a given NavHostController flow

fun SetupNavHost(bottomSheetNavigatorState: StateFlow<BottomSheetNavigatorState?>, navHostController: BottomSheetNavigatorState.() -> NavHostController, rootView: @Composable () -> Unit = { Spacer(modifier = Modifier.fillMaxWidth()) }, builder: BottomSheetContentBuilder)

Creates a a NavHost for a given BottomSheetNavigatorState flow

Link copied to clipboard