-
public final class WearNavScaffoldKt
-
-
Method Summary
Modifier and Type Method Description final static UnitWearNavScaffold(String startDestination, NavHostController navController, Modifier modifier, Function0<Unit> snackbar, Function1<Modifier, Unit> timeText, SwipeDismissableNavHostState state, Function1<NavGraphBuilder, Unit> builder)A Navigation and Scroll aware Scaffold. final static UnitscalingLazyColumnComposable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, Function0<ScalingLazyListState> scrollStateBuilder, Function1<ScaffoldContext<ScalingLazyListState>, Unit> content)Add a screen to the navigation graph featuring a ScalingLazyColumn. final static Unitscrollable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, ScalingLazyColumnState.Factory columnStateFactory, Function1<ScrollableScaffoldContext, Unit> content)Add a screen to the navigation graph featuring a ScalingLazyColumn. final static UnitscrollStateComposable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, Function0<ScrollState> scrollStateBuilder, Function1<ScaffoldContext<ScrollState>, Unit> content)Add a screen to the navigation graph featuring a Scrollable item. final static UnitlazyListComposable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, Function0<LazyListState> lazyListStateBuilder, Function1<ScaffoldContext<LazyListState>, Unit> content)Add a screen to the navigation graph featuring a Lazy list such as LazyColumn. final static UnitwearNavComposable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, Function2<NavBackStackEntry, NavScaffoldViewModel, Unit> content)Add non scrolling screen to the navigation graph. final static Unitcomposable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, Function1<NonScrollableScaffoldContext, Unit> content)Add non scrolling screen to the navigation graph. -
-
Method Detail
-
WearNavScaffold
final static Unit WearNavScaffold(String startDestination, NavHostController navController, Modifier modifier, Function0<Unit> snackbar, Function1<Modifier, Unit> timeText, SwipeDismissableNavHostState state, Function1<NavGraphBuilder, Unit> builder)
A Navigation and Scroll aware Scaffold.
In addition to NavGraphBuilder.scrollable, 3 additional extensions are supported scalingLazyColumnComposable, scrollStateComposable and lazyListComposable.
These should be used to build the ScrollableState or FocusRequester as well as configure the behaviour of TimeText, PositionIndicator or Vignette.
-
scalingLazyColumnComposable
final static Unit scalingLazyColumnComposable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, Function0<ScalingLazyListState> scrollStateBuilder, Function1<ScaffoldContext<ScalingLazyListState>, Unit> content)
Add a screen to the navigation graph featuring a ScalingLazyColumn.
The scalingLazyListState must be taken from the ScaffoldContext.
-
scrollable
final static Unit scrollable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, ScalingLazyColumnState.Factory columnStateFactory, Function1<ScrollableScaffoldContext, Unit> content)
Add a screen to the navigation graph featuring a ScalingLazyColumn.
The ScalingLazyColumnState must be taken from the ScrollableScaffoldContext.
-
scrollStateComposable
final static Unit scrollStateComposable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, Function0<ScrollState> scrollStateBuilder, Function1<ScaffoldContext<ScrollState>, Unit> content)
Add a screen to the navigation graph featuring a Scrollable item.
The scrollState must be taken from the ScaffoldContext.
-
lazyListComposable
final static Unit lazyListComposable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, Function0<LazyListState> lazyListStateBuilder, Function1<ScaffoldContext<LazyListState>, Unit> content)
Add a screen to the navigation graph featuring a Lazy list such as LazyColumn.
The scrollState must be taken from the ScaffoldContext.
-
wearNavComposable
final static Unit wearNavComposable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, Function2<NavBackStackEntry, NavScaffoldViewModel, Unit> content)
Add non scrolling screen to the navigation graph. The NavBackStackEntry and NavScaffoldViewModel are passed into the content block so that the Scaffold may be customised, such as disabling TimeText.
-
composable
final static Unit composable(NavGraphBuilder $self, String route, List<NamedNavArgument> arguments, List<NavDeepLink> deepLinks, Function1<NonScrollableScaffoldContext, Unit> content)
Add non scrolling screen to the navigation graph. The NavBackStackEntry and NavScaffoldViewModel are passed into the content block so that the Scaffold may be customised, such as disabling TimeText.
-
-
-
-