FloatingToolbarScrollBehavior

@Stable
sealed interface FloatingToolbarScrollBehavior : NestedScrollConnection

A FloatingToolbarScrollBehavior defines how a floating toolbar should behave when the content under it is scrolled.

See also

Inheritors

Properties

Link copied to clipboard

Indicates the direction towards which the floating toolbar exits the screen.

Link copied to clipboard
abstract val flingAnimationSpec: DecayAnimationSpec<Float>

An DecayAnimationSpec that defines how to fling the floating toolbar when the user flings the toolbar itself, or the content below it.

Link copied to clipboard
abstract val snapAnimationSpec: AnimationSpec<Float>

An AnimationSpec that defines how the floating toolbar snaps to either fully collapsed or fully extended state when a fling or a drag scrolled it into an intermediate position.

Link copied to clipboard

A FloatingToolbarState that is attached to this behavior and is read and updated when scrolling happens.

Functions

Link copied to clipboard
abstract fun Modifier.floatingScrollBehavior(): Modifier

A Modifier that is attached to this behavior.

Link copied to clipboard
open suspend fun onPostFling(consumed: Velocity, available: Velocity): Velocity
Link copied to clipboard
open fun onPostScroll(consumed: Offset, available: Offset, source: NestedScrollSource): Offset
Link copied to clipboard
open suspend fun onPreFling(available: Velocity): Velocity
Link copied to clipboard
open fun onPreScroll(available: Offset, source: NestedScrollSource): Offset