BottomSheetNavigator

@<Error class: unknown class>
class BottomSheetNavigator : Navigator


Navigator that drives a ModalBottomSheetState for use of ModalBottomSheetLayouts with the navigation library. Every destination using this Navigator must set a valid Composable by setting it directly on an instantiated Destination or calling androidx.compose.material.navigation.bottomSheet.

The sheetContent will always host the latest entry of the back stack. When navigating from a BottomSheetNavigator.Destination to another BottomSheetNavigator.Destination, the content of the sheet will be replaced instead of a new bottom sheet being shown.

When the sheet is dismissed by the user, the state's NavigatorState.backStack will be popped.

Summary

Public constructors

Public functions

open BottomSheetNavigator.Destination
open Unit
navigate(
    entries: List<NavBackStackEntry>,
    navOptions: NavOptions?,
    navigatorExtras: Navigator.Extras?
)
open Unit
open Unit
popBackStack(popUpTo: NavBackStackEntry, savedState: Boolean)

Inherited functions

open NavDestination?
navigate(
    destination: BottomSheetNavigator.Destination,
    args: SavedState?,
    navOptions: NavOptions?,
    navigatorExtras: Navigator.Extras?
)
open Unit
open Unit
open SavedState?
open Boolean

Public constructors

BottomSheetNavigator

Added in 1.7.0
BottomSheetNavigator(sheetState: ModalBottomSheetState)
Parameters
sheetState: ModalBottomSheetState

The ModalBottomSheetState that the BottomSheetNavigator will use to drive the sheet state

Public functions

createDestination

Added in 1.7.0
open fun createDestination(): BottomSheetNavigator.Destination
open fun navigate(
    entries: List<NavBackStackEntry>,
    navOptions: NavOptions?,
    navigatorExtras: Navigator.Extras?
): Unit

onAttach

open fun onAttach(state: NavigatorState): Unit

popBackStack

open fun popBackStack(popUpTo: NavBackStackEntry, savedState: Boolean): Unit

Public properties

Added in 1.7.0
val navigatorSheetStateBottomSheetNavigatorSheetState

Access properties of the ModalBottomSheetLayout's ModalBottomSheetState