androidx.compose.material.navigation

Classes

Top-level functions summary

Unit
@Composable
ModalBottomSheetLayout(
    bottomSheetNavigator: BottomSheetNavigator,
    modifier: Modifier,
    sheetShape: Shape,
    sheetElevation: Dp,
    sheetBackgroundColor: Color,
    sheetContentColor: Color,
    scrimColor: Color,
    content: @Composable () -> Unit
)

Helper function to create a ModalBottomSheetLayout from a BottomSheetNavigator.

BottomSheetNavigator

Create and remember a BottomSheetNavigator

Extension functions summary

Unit
NavGraphBuilder.bottomSheet(
    route: String,
    arguments: List<NamedNavArgument>,
    deepLinks: List<NavDeepLink>,
    content: @Composable ColumnScope.(backstackEntry: NavBackStackEntry) -> Unit
)

Add the content as bottom sheet content to the NavGraphBuilder

inline Unit
<T : Any> NavGraphBuilder.bottomSheet(
    typeMap: Map<KTypeNavType<*>>,
    arguments: List<NamedNavArgument>,
    deepLinks: List<NavDeepLink>,
    noinline content: @Composable ColumnScope.(backstackEntry: NavBackStackEntry) -> Unit
)

Add the content as bottom sheet content to the NavGraphBuilder

Top-level functions

@Composable
fun ModalBottomSheetLayout(
    bottomSheetNavigator: BottomSheetNavigator,
    modifier: Modifier = Modifier,
    sheetShape: Shape = MaterialTheme.shapes.large,
    sheetElevation: Dp = ModalBottomSheetDefaults.Elevation,
    sheetBackgroundColor: Color = MaterialTheme.colors.surface,
    sheetContentColor: Color = contentColorFor(sheetBackgroundColor),
    scrimColor: Color = ModalBottomSheetDefaults.scrimColor,
    content: @Composable () -> Unit
): Unit

Helper function to create a ModalBottomSheetLayout from a BottomSheetNavigator.

rememberBottomSheetNavigator

@Composable
fun rememberBottomSheetNavigator(
    animationSpec: AnimationSpec<Float> = SpringSpec()
): BottomSheetNavigator

Create and remember a BottomSheetNavigator

Extension functions

fun NavGraphBuilder.bottomSheet(
    route: String,
    arguments: List<NamedNavArgument> = emptyList(),
    deepLinks: List<NavDeepLink> = emptyList(),
    content: @Composable ColumnScope.(backstackEntry: NavBackStackEntry) -> Unit
): Unit

Add the content as bottom sheet content to the NavGraphBuilder

Parameters
route: String

route for the destination

arguments: List<NamedNavArgument> = emptyList()

list of arguments to associate with destination

deepLinks: List<NavDeepLink> = emptyList()

list of deep links to associate with the destinations

content: @Composable ColumnScope.(backstackEntry: NavBackStackEntry) -> Unit

the sheet content at the given destination

inline fun <T : Any> NavGraphBuilder.bottomSheet(
    typeMap: Map<KTypeNavType<*>> = emptyMap(),
    arguments: List<NamedNavArgument> = emptyList(),
    deepLinks: List<NavDeepLink> = emptyList(),
    noinline content: @Composable ColumnScope.(backstackEntry: NavBackStackEntry) -> Unit
): Unit

Add the content as bottom sheet content to the NavGraphBuilder

Parameters
<T : Any>

route from a KClass for the destination

typeMap: Map<KTypeNavType<*>> = emptyMap()

map of destination arguments' kotlin type KType to its respective custom NavType. May be empty if T does not use custom NavTypes.

arguments: List<NamedNavArgument> = emptyList()

list of arguments to associate with destination

deepLinks: List<NavDeepLink> = emptyList()

list of deep links to associate with the destinations

noinline content: @Composable ColumnScope.(backstackEntry: NavBackStackEntry) -> Unit

the sheet content at the given destination