rememberSearchBarState

Functions summary

SearchBarState
@ExperimentalMaterial3Api
@Composable
rememberSearchBarState(
    initialValue: SearchBarValue,
    animationSpecForExpand: AnimationSpec<Float>,
    animationSpecForCollapse: AnimationSpec<Float>
)

Create and remember a SearchBarState.

Cmn

Functions

rememberSearchBarState

@ExperimentalMaterial3Api
@Composable
fun rememberSearchBarState(
    initialValue: SearchBarValue = SearchBarValue.Collapsed,
    animationSpecForExpand: AnimationSpec<Float> = MotionSchemeKeyTokens.SlowSpatial.value(),
    animationSpecForCollapse: AnimationSpec<Float> = MotionSchemeKeyTokens.DefaultSpatial.value()
): SearchBarState

Create and remember a SearchBarState.

Parameters
initialValue: SearchBarValue = SearchBarValue.Collapsed

the initial value of whether the search bar is collapsed or expanded.

animationSpecForExpand: AnimationSpec<Float> = MotionSchemeKeyTokens.SlowSpatial.value()

the animation spec used when the search bar expands.

animationSpecForCollapse: AnimationSpec<Float> = MotionSchemeKeyTokens.DefaultSpatial.value()

the animation spec used when the search bar collapses.