moveBetween

open fun Modifier.moveBetween(expanded: Alignment, collapsed: Alignment, expandedPadding: PaddingValues = PaddingValues(0.dp), collapsedPadding: PaddingValues = PaddingValues(0.dp), collapsedScale: Float = 1.0f): Modifier(source)

Glides the element from its place in the expanded header to its place in the toolbar, scaling toward collapsedScale on the way. Meant for the overlayContent slot, whose elements sit above the body and the toolbar, so the element stays visible once collapsed.

expanded aligns the element within the header area (the status bar inset plus the header height) inset by expandedPadding; collapsed aligns it within the toolbar area inset by collapsedPadding. Both alignments honor the layout direction.