rememberWithGapSearchBarState

Create and remember a [SearchBarState] to use in conjunction with

rememberWithGapSearchBarState

Composable Function

Common
@ExperimentalMaterial3Api
@Composable
fun rememberWithGapSearchBarState(
    initialValue: SearchBarValue = SearchBarValue.Collapsed,
    animationSpecForExpand: AnimationSpec<Float> = MotionSchemeKeyTokens.DefaultSpatial.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 ExpandedDockedSearchBarWithGap.

Parameters

initialValuethe initial value of whether the search bar is collapsed or expanded.
animationSpecForExpandthe animation spec used when the search bar expands.
animationSpecForCollapsethe animation spec used when the search bar collapses.
animationSpecForContentFadeInthe animation spec used for the content when the search bar expands.
animationSpecForContentFadeOutthe animation spec used for the content when the search bar collapses.