rememberContainedSearchBarState

Functions summary

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

Create and remember a SearchBarState to use in conjunction with ExpandedFullScreenContainedSearchBar.

Cmn

Functions

rememberContainedSearchBarState

@ExperimentalMaterial3Api
@Composable
fun rememberContainedSearchBarState(
    initialValue: SearchBarValue = SearchBarValue.Collapsed,
    animationSpecForExpand: AnimationSpec<Float> = MotionSchemeKeyTokens.FastSpatial.value(),
    animationSpecForCollapse: AnimationSpec<Float> = MotionSchemeKeyTokens.FastSpatial.value(),
    animationSpecForContentFadeIn: AnimationSpec<Float> = AnimationForContentFadeInSpec,
    animationSpecForContentFadeOut: AnimationSpec<Float> = AnimationForContentFadeOutSpec
): SearchBarState

Create and remember a SearchBarState to use in conjunction with ExpandedFullScreenContainedSearchBar.

Parameters
initialValue: SearchBarValue = SearchBarValue.Collapsed

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

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

the animation spec used when the search bar expands.

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

the animation spec used when the search bar collapses.

animationSpecForContentFadeIn: AnimationSpec<Float> = AnimationForContentFadeInSpec

the animation spec used for the content when the search bar expands.

animationSpecForContentFadeOut: AnimationSpec<Float> = AnimationForContentFadeOutSpec

the animation spec used for the content when the search bar collapses.