BottomAppBarDefaults


Contains default values used for the bottom app bar implementations.

Summary

Public functions

BottomAppBarScrollBehavior
@ExperimentalMaterial3Api
@Composable
exitAlwaysScrollBehavior(
    state: BottomAppBarState,
    canScroll: () -> Boolean,
    snapAnimationSpec: AnimationSpec<Float>?,
    flingAnimationSpec: DecayAnimationSpec<Float>?
)

Returns a BottomAppBarScrollBehavior.

Cmn

Public properties

Dp

Default elevation used for BottomAppBar

Cmn
PaddingValues

Default padding used for BottomAppBar when content are default size (24dp) icons in IconButton that meet the minimum touch target (48.dp).

Cmn
Dp

Default height of a flexible FlexibleBottomAppBar.

Cmn
PaddingValues

Default padding used for FlexibleBottomAppBar.

Cmn
Arrangement.Horizontal

An Arrangement that will be used to space FlexibleBottomAppBar's with a fixed spacing.

Cmn
Arrangement.Horizontal

A default Arrangement that will be used to space a FlexibleBottomAppBar's content.

Cmn
Color

The color of a BottomAppBar's FloatingActionButton

Cmn
Color

Default color used for BottomAppBar container

Cmn
WindowInsets

Default insets that will be used and consumed by BottomAppBar.

Cmn

Public functions

exitAlwaysScrollBehavior

@ExperimentalMaterial3Api
@Composable
fun exitAlwaysScrollBehavior(
    state: BottomAppBarState = rememberBottomAppBarState(),
    canScroll: () -> Boolean = { true },
    snapAnimationSpec: AnimationSpec<Float>? = MotionSchemeKeyTokens.FastSpatial.value(),
    flingAnimationSpec: DecayAnimationSpec<Float>? = rememberSplineBasedDecay()
): BottomAppBarScrollBehavior

Returns a BottomAppBarScrollBehavior. A bottom app bar that is set up with this BottomAppBarScrollBehavior will immediately collapse when the content is pulled up, and will immediately appear when the content is pulled down.

The returned BottomAppBarScrollBehavior is remembered across compositions.

Parameters
state: BottomAppBarState = rememberBottomAppBarState()

the state object to be used to control or observe the bottom app bar's scroll state. See rememberBottomAppBarState for a state that is remembered across compositions.

canScroll: () -> Boolean = { true }

a callback used to determine whether scroll events are to be handled by this ExitAlwaysScrollBehavior

snapAnimationSpec: AnimationSpec<Float>? = MotionSchemeKeyTokens.FastSpatial.value()

an optional AnimationSpec that defines how the bottom app bar snaps to either fully collapsed or fully extended state when a fling or a drag scrolled it into an intermediate position

flingAnimationSpec: DecayAnimationSpec<Float>? = rememberSplineBasedDecay()

an optional DecayAnimationSpec that defined how to fling the bottom app bar when the user flings the app bar itself, or the content below it

Public properties

ContainerElevation

val ContainerElevationDp

Default elevation used for BottomAppBar

ContentPadding

val ContentPaddingPaddingValues

Default padding used for BottomAppBar when content are default size (24dp) icons in IconButton that meet the minimum touch target (48.dp).

FlexibleBottomAppBarHeight

@ExperimentalMaterial3ExpressiveApi
val FlexibleBottomAppBarHeightDp

Default height of a flexible FlexibleBottomAppBar. The height here represents the height of the bottom app bar in its expanded state.

FlexibleContentPadding

@ExperimentalMaterial3ExpressiveApi
val FlexibleContentPaddingPaddingValues

Default padding used for FlexibleBottomAppBar.

FlexibleFixedHorizontalArrangement

@ExperimentalMaterial3ExpressiveApi
val FlexibleFixedHorizontalArrangementArrangement.Horizontal

An Arrangement that will be used to space FlexibleBottomAppBar's with a fixed spacing.

FlexibleHorizontalArrangement

@ExperimentalMaterial3ExpressiveApi
val FlexibleHorizontalArrangementArrangement.Horizontal

A default Arrangement that will be used to space a FlexibleBottomAppBar's content.

bottomAppBarFabColor

val bottomAppBarFabColorColor

The color of a BottomAppBar's FloatingActionButton

containerColor

val containerColorColor

Default color used for BottomAppBar container

windowInsets

val windowInsetsWindowInsets

Default insets that will be used and consumed by BottomAppBar.